f(int i)1 bool f(int i) { return i != 5; }
2 
3 template <class X, class P = bool(X)>
4 struct Traits
5 {
6  typedef P type;
7 };
8 
9 template <class X, class P = typename Traits<X>::type>
10 struct S
11 {
12  const P& p_;
SS13  S( const P& p ) : p_(p) {} // const reference
14 };
15 
16 template <class X>
make_s(const typename Traits<X>::type & p)17 S<X> make_s(const typename Traits<X>::type & p) // const reference
18 {
19  return S<X>(p); // << HERE
20 }
21 
22 
main()23 int main()
24 {
25  make_s<int>(f);
26 }
27