111
|
1 // PR c++/69005
|
|
2 // { dg-do compile { target c++11 } }
|
|
3
|
|
4 template<typename T> T& declval();
|
|
5
|
|
6 template<typename _Sig> class function;
|
|
7
|
|
8 template<typename _Res, typename _Arg>
|
|
9 struct function<_Res(_Arg)>
|
|
10 {
|
|
11 function() noexcept { }
|
|
12
|
|
13 function(const function&) { }
|
|
14
|
|
15 template<typename _Functor,
|
|
16 typename = decltype(declval<_Functor&>()(declval<_Arg>()))>
|
|
17 function(_Functor) { }
|
|
18
|
|
19 _Res operator()(_Arg) const;
|
|
20 };
|
|
21
|
|
22 struct Foo {
|
|
23 function<void(Foo)> Func;
|
|
24 };
|
|
25
|
|
26 extern Foo exfoo;
|
|
27 Foo f (exfoo);
|