PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / template / array29.C
blobf3eb95dc0aa4ca6375a30ed014afa11e2b1d2ccf
1 // PR c++/63485
3 template <typename C> struct A
5   typedef C type;
6 };
7 template <class> class B
9 };
10 template <class Range> void as_literal (Range &);
11 template <typename> struct C
13   typedef wchar_t char_type;
14   const char_type on_full_year_placeholder[3];
15   void
16   on_extended_iso_date ()
17   {
18     B<A<wchar_t const[3]>::type> a;
19     as_literal (on_full_year_placeholder);
20   }
22 template <typename> struct date_time_format_parser_callback : C<wchar_t>
25 template <typename BaseT> struct D
27   typedef typename BaseT::char_type char_type;
28   char_type
29   parse (const char_type *, const char_type *,
30          typename BaseT::callback_type p3)
31   {
32     p3.on_extended_iso_date ();
33     return char_type();
34   }
36 struct F
38   typedef date_time_format_parser_callback<wchar_t> callback_type;
39   typedef wchar_t char_type;
41 template <typename CharT, typename ParserT, typename CallbackT>
42 void
43 parse_format (CharT *p1, ParserT p2, CallbackT p3)
45   CharT p = p2.parse (&p, p1, p3);
47 template <typename CharT>
48 void
49 parse_date_time_format (const CharT *, const CharT *p2,
50                         date_time_format_parser_callback<CharT> &p3)
52   D<F> b;
53   parse_format (p2, b, p3);
55 template void
56 parse_date_time_format (const wchar_t *, const wchar_t *,
57                         date_time_format_parser_callback<wchar_t> &);