blob: 1b63c467bb3f686010746774faf71cbbda111ed2 (
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
27
|
// PR c++/67225
// { dg-do compile { target c++20 } }
// { dg-additional-options "-fconcepts" }
template <class T, class U>
concept Same = true;
template <class T> struct WrapT {T t;};
template <class T>
concept Destructible =
requires(T t, const T ct, WrapT<T>& wt) // { dg-message "in requirements" }
{
{wt.~WrapT()} noexcept;
// {&t} -> Same<T*>; // #1
//{&t} -> T*; // #2
};
template <Destructible T>
void f() {}
struct Y {private: ~Y();};
int main()
{
f<Y>(); // { dg-error "" }
}
|