On 11/13/19 2:42 PM, Andrew Sutton wrote:
Suppress diagnostics when substituting into requires-expressions
outside of concept definitions.

This change broke one existing test, which I've updated to match the
behavior of the current patch. Specifically, it changed the case
below:

template<typename T>
constexpr bool subst = true;

template<typename U>
constexpr bool test()
{
   if constexpr (requires { requires subst<U&>; }) // error?
     return true;
   else
     return false;
}

static_assert(!test<void>());

Before, the program is ill-formed as a result of substituting void for
U. After applying, the requirement is false. If you replace the
requires-expression with a concept (either before or after the patch),
you get false. So, this seems like the right behavior.

OK.

Jason

Reply via email to