Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/variadic101.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 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 } |