PR lto/84212 - -Wno-* does not disable warnings from -flto link stage
[official-gcc.git] / gcc / testsuite / g++.dg / pr62079.C
blob919c3e5de366fd7ca63f462ca8b127408c23b329
1 // { dg-do compile }
2 // { dg-options "-std=c++11 -O2 -fnon-call-exceptions" }
4 template < typename > class allocator;
6 template < class _CharT > struct char_traits;
7 template < typename _CharT, typename _Traits = char_traits < _CharT >,
8   typename _Alloc = allocator < _CharT > >class basic_string;
9 typedef basic_string < char >string;
11 template < typename _Tp > class new_allocator
13   template < typename _Tp1 > struct rebind
14   {
15     typedef new_allocator < _Tp1 > other;
16   };
19 template < typename _Tp > using __allocator_base = new_allocator < _Tp >;
20 template < typename _Tp > class allocator:public __allocator_base < _Tp >
24 template < typename _CharT, typename _Traits, typename _Alloc >
25   class basic_string
27 public:
28   basic_string (const _CharT * __s, const _Alloc & __a = _Alloc ());
29   ~basic_string ()noexcept;
32 template < typename T > struct add_reference
34   typedef T & type;
37 template < typename ... Values > class tuple;
38 template <> class tuple <>
42 template < typename Head, typename ... Tail > class tuple < Head, Tail ... >:private tuple <
43   Tail ...
44   >
46   typedef tuple < Tail ... >inherited;
47 public:
48   template < typename ... VValues >
49     tuple (const tuple < VValues ... >&other):inherited (other.tail ()),
50     m_head (other.head ())
51   {
52   }
53   typename add_reference < const Head >::type head () const
54   {
55     return m_head;
56   }
57   const inherited & tail () const
58   {
59     return *this;
60   }
61   Head m_head;
64 template < typename T > struct make_tuple_result
66   typedef T type;
69 template < typename ... Values >
70   tuple < typename make_tuple_result <
71   Values >::type ... >make_tuple (const Values & ... values);
73 int
74 main ()
76   tuple < int, float, string > t3c =
77     make_tuple (17, 2.718281828, string ("Fun"));