repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
variadic101.C
blob
8bcedfff6ab904842514c10d8abfbf63a503c8e6
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
}