3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 15 Dec 2001 <nathan@codesourcery.com>
12 typedef T type_less_spec;
16 struct call_traits<T&>
18 typedef T type_more_spec;
26 // Two typedefs lead to the instant. of the less spec. ("wrong") template
28 typedef const r_type cr_type;
29 call_traits<cr_type>::type_less_spec var = num; // { dg-error "" "" }
31 // The explicit type leads to the instantiation of the "correct" one
32 call_traits<const int&>::type_more_spec var2 = num;
34 // As happen with a single typedef!
35 typedef const int& std_cr_type;
36 call_traits<std_cr_type>::type_more_spec var3 = num;
39 // As happen, indeed, without the cv-qualifier
40 call_traits<r_type>::type_more_spec var4;