| 1 |
// PR c++/108550 |
| 2 |
// { dg-do compile { target c++14 } } |
| 3 |
|
| 4 |
template<class T> |
| 5 |
struct is_pointer |
| 6 |
{ |
| 7 |
static constexpr bool value = false; |
| 8 |
}; |
| 9 |
|
| 10 |
template<class T, T T1> |
| 11 |
struct integral_constant |
| 12 |
{ |
| 13 |
static constexpr T value = T1; |
| 14 |
}; |
| 15 |
|
| 16 |
|
| 17 |
template <class Tp> |
| 18 |
constexpr auto is_pointer_v = is_pointer<Tp>::value; |
| 19 |
|
| 20 |
template <class Tp, int = 0> |
| 21 |
integral_constant<bool, is_pointer_v<int>> Wrap1(); |
| 22 |
|
| 23 |
int main() { |
| 24 |
static_assert(!decltype(Wrap1<int>())::value, ""); |
| 25 |
} |