These two examples are very similar, but the second one is ill-formed per the wording despite implementations accepting it due to user demand:
template <typename T>
concept C = requires (typename T::type x) {
x + 1;
};
static_assert(!C<int>);
vs.
template <typename T>
constexpr bool b = requires (T::type x) { x + 1; };
static_assert(!b<int>); // de-jure ill-formed, but widely accepted by implementations
In order to make the second case well-formed, the user needs to write a nested requires that checks for the presence of T::type first.
See CWG2565 for details.
These two examples are very similar, but the second one is ill-formed per the wording despite implementations accepting it due to user demand:
vs.
In order to make the second case well-formed, the user needs to write a nested requires that checks for the presence of
T::typefirst.See CWG2565 for details.