https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96922
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-09-03
Keywords| |rejects-valid
Component|libstdc++ |c++
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is nothing to do with libstdc++, changing component to c++.
Reduced:
template<typename...> struct trait { static constexpr bool value = true; };
// Not working for concepts with variadic templates
template <typename t, typename ...args_t>
concept constructible_from = trait<t, args_t...>::value;
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 = trait<t, u>::value;
template <typename t>
requires (constructible_from_one<t, t>)
void foo();
Compiles with -std=c++20 but not -std=c++17 -fconcepts
I don't see anything in the Concepts TS grammar which would make this invalid.