FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / mangle2.C
bloba7b95b1a4080b5607d61d006d332b8f107fc3c1f
1 // Build don't link:
2 // 
3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 25 April 2001 <nathan@codesourcery.com>
5 // Origin:pcarlini@unitus.it
7 // Bug 2559. We hadn't implemented code to mangle numbers bigger than
8 // HOST_WIDE_INT.
10 template<class T, T min_val, T max_val>
11 class integer_traits_base
13 public:
14 static const bool is_integral = true;
17 template<class T>
18 class integer_traits
20 public:
21 static const bool is_integral = false;
24 template<>
25 class integer_traits<long long>
26 : public integer_traits_base<long long, (-9223372036854775807LL - 1),
27 9223372036854775807LL>
28 { };
30 integer_traits<long long> f;
32 template <class T, T value> T foo () 
34   return value;
37 void x ()
39   foo<long long, -9223372036854775807LL> ();