Debian Codegraph @

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

raw
1 // PR c++/43382
2 // { dg-do compile { target c++11 } }
3
4 template<class T>
5 struct Container
6 { T f() const; };
7
8 template<class T>
9 T deref(const T& t)
10 { return t; }
11
12
13 template <class T, class... Args>
14 auto
15 deref(const T& u, int r, Args... args)
16 -> decltype(deref(u.f(), args...))
17 { return deref(u.f(), args...); }
18
19 int main(void)
20 {
21 Container<Container<int>> v;
22 deref(v,1,2);
23 }