https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96922
Bug ID: 96922 Summary: primary expression error when using parenthesis around requires expression for some concepts Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: rene.r...@fu-berlin.de Target Milestone: --- Hi GCC team, I found a strange behavior when using c++17 mode with -fconcepts on gcc 10 as well as gcc 9. Basically, if we use a concept that uses variadic templates then the compiler emits a primary expression error when putting parenthesis around the requires expression. This does not happen if we leave the parenthesis away or if the concept does not use variadic templates. Here the example I ran into (https://godbolt.org/z/95d4Y3): ```cpp #include <type_traits> // Not working for concepts with variadic templates template <typename t, typename ...args_t> concept constructible_from = std::is_constructible_v<t, args_t...>; template <typename t> requires (constructible_from<t>) // does not work with parenthesis void foo(); template <typename t> requires constructible_from<t> // works without parenthesis void bar(); // Working without variadic templates template <typename t, typename u> concept constructible_from_one = std::is_constructible_v<t, u>; template <typename t> requires (constructible_from_one<t, t>) void foo(); ``` Thank you very much for your help.