blob: 0dd0f88d6ecc64c40bb5e06928402b8fbd6ffdd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// PR c++/94628
// A variant of variadic101.C where the recursive call to deref
// has its first template argument explicitly provided.
// { dg-do compile { target c++11 } }
template<class T>
struct Container
{ T f() const; };
template<class T>
T deref(const T& t)
{ return t; }
template <class T, class... Args>
auto
deref(const T& u, int r, Args... args)
-> decltype(deref(u.f(), args...))
{ return deref<decltype(u.f())>(u.f(), args...); }
int main(void)
{
Container<Container<int>> v;
deref(v,1,2);
}
|