view gcc/testsuite/g++.dg/concepts/diagnostic9.C @ 19:2b5abeee2509 default tip

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

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

template<typename T>
void f2(T a)
  requires requires (const decltype(a) &&x) { -x; }
{ }

int main() {
  f2<void*>(nullptr); // { dg-error "use of function .*const decltype\\(f2::a\\)&&" }
}