| 1 |
// PR c++/108099 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
// { dg-options "" } |
| 4 |
|
| 5 |
typedef unsigned long long t64; |
| 6 |
template <typename T, T v> struct integral_constant { |
| 7 |
static constexpr T value = v; |
| 8 |
}; |
| 9 |
typedef integral_constant <bool, false> false_type; |
| 10 |
typedef integral_constant <bool, true> true_type; |
| 11 |
template <class T, class U> |
| 12 |
struct is_same : false_type {}; |
| 13 |
template <class T> |
| 14 |
struct is_same <T, T> : true_type {}; |
| 15 |
|
| 16 |
using s64 = signed t64; |
| 17 |
static_assert (is_same <long long, s64>::value, ""); |
| 18 |
static_assert (is_same <signed long long, s64>::value, ""); |
| 19 |
static_assert (sizeof (s64) == sizeof (long long), ""); |
| 20 |
static_assert (s64(-1) < 0, ""); |
| 21 |
|
| 22 |
using u64 = unsigned t64; |
| 23 |
static_assert (is_same <unsigned long long, u64>::value, ""); |
| 24 |
static_assert (sizeof (u64) == sizeof (unsigned long long), ""); |
| 25 |
static_assert (u64(-1) > 0, ""); |