Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp1z/decomp46.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 // PR c++/86836 | |
2 // { dg-do compile { target c++11 } } | |
3 // { dg-options "" } | |
4 | |
5 struct A { | |
6 int operator*(); | |
7 void operator++(); | |
8 bool operator!=(A); | |
9 }; | |
10 template <typename> class map { | |
11 public: | |
12 A begin(); | |
13 A end(); | |
14 }; | |
15 | |
16 template <typename T> void mergemap(map<T> orig, map<T> toadd) { | |
17 for (auto p : toadd) | |
18 auto [orig] = orig; // { dg-error "use of 'orig' before deduction of 'auto'" } | |
19 } // { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 } | |
20 | |
21 int | |
22 main() { | |
23 map<double> x, y; | |
24 mergemap(x, y); | |
25 } |