comparison gcc/testsuite/g++.dg/cpp2a/concepts-lambda6.C @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
145:1830386684a0 152:2b5abeee2509
1 // PR c++/94645
2 // { dg-do compile { target concepts } }
3
4 struct unordered_map {
5 int cend() const noexcept;
6 };
7
8 template <typename a> concept HasMapInterface = requires(a t) { t.cend(); };
9
10 template <typename Mapper> requires HasMapInterface<decltype(Mapper::map())>
11 struct l {
12 friend void foo(l opt) { ([]() {})(); }
13 };
14
15 struct p {
16 static unordered_map map();
17 };
18
19 void g(l<p> *y) { foo(*y); }