| 1 |
// PR 98372 ICE due to incorrect type compare |
| 2 |
// { dg-do compile { target c++14 } } |
| 3 |
|
| 4 |
template <typename _Tp> using remove_pointer_t = typename _Tp ::type; |
| 5 |
template <bool> struct enable_if; |
| 6 |
template <bool _Cond, typename> |
| 7 |
using enable_if_t = typename enable_if<_Cond>::type; |
| 8 |
template <typename> bool is_convertible_v; |
| 9 |
template <typename, unsigned long = 0> class Span; |
| 10 |
template <typename T, unsigned long> class Span { |
| 11 |
using element_type = T; |
| 12 |
template <unsigned long N> |
| 13 |
Span(element_type (&arr)[N], |
| 14 |
enable_if_t<is_convertible_v<remove_pointer_t<decltype(data(arr))>>, |
| 15 |
decltype(nullptr)>); |
| 16 |
}; |
| 17 |
template <typename T> class Span<T> { |
| 18 |
using element_type = T; |
| 19 |
template <unsigned long N> |
| 20 |
Span(element_type (&arr)[N], |
| 21 |
enable_if_t<is_convertible_v<remove_pointer_t<decltype(data(arr))>>, |
| 22 |
decltype(nullptr)>); |
| 23 |
}; |
| 24 |
|
| 25 |
struct aaa |
| 26 |
{ |
| 27 |
Span<char> data0; |
| 28 |
}; |