aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/consteval6.C
blob: cddb73dfaa2e589d03304b2e5a0bb6287e8c431b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// { dg-do compile }
// { dg-options "-std=c++2a" }

struct A {
  constexpr A () {}
  A (A const&) = delete;	// { dg-bogus "declared here" }
};

template<typename T>
constexpr void
foo ()
{
  T t;
  T u = t;
}

template<typename T>
consteval void
bar ()
{
  T t;
  T u = t;	// { dg-bogus "use of deleted function" }
}

using B = decltype (foo<A> ());
using C = decltype (bar<A> ());	// { dg-bogus "required from here" }