Consider the following two simple concepts:
template <typename T>
concept C1 = requires(T t) {
[t = t]{ t; };
};
template <typename T>
concept C2 = requires(T t) {
[t]{ t; };
};
In my opinion, the two declarations should be equivalent, but GCC rejects the concept C2 and says:
<source>:10:9: error: use of parameter outside function body before ';' token
Why GCC only accepts the concept C1, or this is just a bug? If not, what is the difference between those two declarations?