view gcc/testsuite/g++.dg/concepts/diagnostic13.C @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
line wrap: on
line source

// PR c++/94830
// { dg-do compile { target concepts } }

template<typename T, typename R>
  concept c = __is_same(T, R); // { dg-message "with T = int; R = char" }

template<typename T, typename R>
  requires c<T,R>
void foo() { }

void bar()
{
  foo<int, char>(); // { dg-error "unsatisfied constraints" }
}