Skip to content

Template code failing to compile after f46d146 #94194

@dyung

Description

@dyung

As part of our testing, we build external codebases including the compile-time-regular-expressions codebase (hanickadot/compile-time-regular-expressions). After commit f46d146, the code started to fail to compile with an error:

include\ctre\wrapper.hpp:173:27: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  170 |                 return Method::template exec();
      |                                         ^
1 error generated.

You can see the sources that are failing to compile at https://github.com/hanickadot/compile-time-regular-expressions/blob/eb9577aae3515d14e6c5564f9aeb046d2e7c1124/include/ctre/wrapper.hpp#L173.

This code compiles correctly with the previous compiler, and is also accepted by gcc. @evelez7 can you verify that this code whether this code is correctly being rejected by the compiler? And if so, how should it be fixed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"questionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions