I forgot to mention a somewhat odd test included in the patch:
concepts-recursive-sat3.C does not recurse. Code follows:

template<typename T>
concept Fooable = requires(T t) { foo(t); };

template<Fooable T>
void foo(T t) { }

void test()
{
  foo(0); // { dg-error "unsatisfied constraints" }
}

It doesn't crash, but it doesn't diagnose also doesn't fail as a
result of recursive instantiation. The recursive-sat2.C test is the
same except that it instantiates foo with a class type. This seems
like it might be related to ADL, but entirely certain.

Andrew Sutton

On Mon, Nov 18, 2019 at 10:13 AM Andrew Sutton
<andrew.n.sut...@gmail.com> wrote:
>
> This applies on top of the patch here:
> https://gcc.gnu.org/ml/gcc-patches/2019-11/msg01034.html
>
> Wrap satisfaction with push/pop_tinst_level to force termination on recursion.
>
> Andrew Sutton

Reply via email to