blob: 40959effa5e50acea9d58f5075fdaa64777df901 (
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
|
/* { dg-do compile } */
/* { dg-options "-O2" } */
struct adaptor_base {
};
struct bound_argument {
bound_argument();
};
template <class T_functor> struct adaptor_functor : public adaptor_base {
explicit adaptor_functor(const T_functor& _A_functor) : functor_(_A_functor)
{
}
T_functor functor_;
bound_argument bound_;
};
template <class T_functor> struct adapts : public adaptor_base {
explicit adapts(const T_functor& _A_functor) : functor_(_A_functor) {
}
adaptor_functor<T_functor> functor_;
};
int main() {
adapts<adapts<int> > a (adapts<int>(1));
}
|