blob: 6b7858d9de5729c9beb6cf616374cde450c06349 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// PR c++/103049
// P0849R8 - auto(x)
// { dg-do compile { target c++20 } }
void f (int);
void
g ()
{
auto a1 = auto(f); // { dg-error "only available with" "" { target c++20_only } }
auto a2 = auto{f}; // { dg-error "only available with" "" { target c++20_only } }
static_assert (__is_same_as (decltype (a1), void(*)(int)));
static_assert (__is_same_as (decltype (a2), void(*)(int)));
}
|