Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/decltype61.C

raw
1 // DR 1510, PR c++/60420
2 // { dg-do compile { target c++11 } }
3
4 struct MyIter
5 {
6 int& operator*();
7 };
8
9 void foo(MyIter begin)
10 {
11 auto x = [](const decltype(*begin)) { };
12 }
13
14 template<typename Iterator>
15 void bar(Iterator begin)
16 {
17 auto x = [](const decltype(*begin)) { };
18 }
19
20 template void bar<MyIter>(MyIter);