| 1 |
// PR c++/92601 |
| 2 |
// { dg-additional-options "-g -fchecking -std=c++17" } |
| 3 |
|
| 4 |
typedef int size_t; |
| 5 |
template <typename, int __v> struct integral_constant { |
| 6 |
static constexpr int value = __v; |
| 7 |
}; |
| 8 |
template <typename> struct A; |
| 9 |
template <typename _Tp> using __remove_cv_t = typename A<_Tp>::type; |
| 10 |
template <typename _Tp, typename _Up> |
| 11 |
struct B : integral_constant<bool, __is_same_as(_Tp, _Up)> {}; |
| 12 |
template <typename...> class tuple; |
| 13 |
template <typename> struct A { |
| 14 |
using type = tuple<const char *, const char *>; |
| 15 |
}; |
| 16 |
template <typename> struct C { typedef __remove_cv_t<int> __type; }; |
| 17 |
template <typename _Tp> class D { |
| 18 |
public: |
| 19 |
typedef typename C<_Tp>::__type type; |
| 20 |
}; |
| 21 |
template <bool> struct enable_if; |
| 22 |
template <int> struct F {}; |
| 23 |
template <typename, typename> class G { |
| 24 |
public: |
| 25 |
int operator*(); |
| 26 |
void operator++(); |
| 27 |
}; |
| 28 |
template <typename _Iterator, typename _Container> |
| 29 |
bool operator!=(G<_Iterator, _Container>, G<_Iterator, _Container>); |
| 30 |
template <typename> class H; |
| 31 |
template <typename = H<tuple<const char *, const char *>>> class vector { |
| 32 |
public: |
| 33 |
typedef G<int, vector> iterator; |
| 34 |
iterator begin(); |
| 35 |
iterator end(); |
| 36 |
}; |
| 37 |
template <typename> struct pack_c { typedef pack_c type; }; |
| 38 |
template <typename, typename> struct make_index_pack_join; |
| 39 |
template <size_t... Left, size_t... Right> |
| 40 |
struct make_index_pack_join<pack_c<size_t, Left...>, pack_c<size_t, Right...>> |
| 41 |
: pack_c<size_t> {}; |
| 42 |
template <int N> |
| 43 |
struct I |
| 44 |
: make_index_pack_join<typename I<N / 2>::type, typename I<N / 2>::type> {}; |
| 45 |
template <> struct I<1> : pack_c<size_t> {}; |
| 46 |
template <typename TTuple, typename> |
| 47 |
struct are_tuples_compatible_not_same |
| 48 |
: F<B<typename D<TTuple>::type, int>::value> {}; |
| 49 |
template <typename...> struct tuple_impl; |
| 50 |
template <size_t... Is, typename... Ts> |
| 51 |
struct tuple_impl<pack_c<size_t, Is...>, Ts...> { |
| 52 |
template <typename UTuple, typename enable_if<are_tuples_compatible_not_same< |
| 53 |
tuple<>, UTuple>::value>::type> |
| 54 |
tuple_impl(UTuple &&); |
| 55 |
}; |
| 56 |
template <typename... Ts> class tuple { |
| 57 |
tuple_impl<typename I<sizeof...(Ts)>::type> _impl; |
| 58 |
tuple(tuple &) = default; |
| 59 |
}; |
| 60 |
vector message_handler_registrations; |
| 61 |
void fn1() { |
| 62 |
for (auto t : message_handler_registrations) |
| 63 |
; |
| 64 |
} |