mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Fix some code which is invalid in C++11: an expression of enumeration type
can't be used as a non-type template argument of type bool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163840 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
785a41d138
commit
0067567927
@ -54,8 +54,9 @@ struct is_class
|
|||||||
// is_class<> metafunction due to Paul Mensonides (leavings@attbi.com). For
|
// is_class<> metafunction due to Paul Mensonides (leavings@attbi.com). For
|
||||||
// more details:
|
// more details:
|
||||||
// http://groups.google.com/groups?hl=en&selm=000001c1cc83%24e154d5e0%247772e50c%40c161550a&rnum=1
|
// http://groups.google.com/groups?hl=en&selm=000001c1cc83%24e154d5e0%247772e50c%40c161550a&rnum=1
|
||||||
public:
|
public:
|
||||||
enum { value = sizeof(char) == sizeof(dont_use::is_class_helper<T>(0)) };
|
static const bool value =
|
||||||
|
sizeof(char) == sizeof(dont_use::is_class_helper<T>(0));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -162,12 +163,11 @@ template <typename T> class is_integral_or_enum {
|
|||||||
static UnderlyingT &nonce_instance;
|
static UnderlyingT &nonce_instance;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum {
|
static const bool
|
||||||
value = (!is_class<UnderlyingT>::value && !is_pointer<UnderlyingT>::value &&
|
value = (!is_class<UnderlyingT>::value && !is_pointer<UnderlyingT>::value &&
|
||||||
!is_same<UnderlyingT, float>::value &&
|
!is_same<UnderlyingT, float>::value &&
|
||||||
!is_same<UnderlyingT, double>::value &&
|
!is_same<UnderlyingT, double>::value &&
|
||||||
sizeof(char) != sizeof(check_int_convertible(nonce_instance)))
|
sizeof(char) != sizeof(check_int_convertible(nonce_instance)));
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// enable_if_c - Enable/disable a template based on a metafunction
|
// enable_if_c - Enable/disable a template based on a metafunction
|
||||||
|
Loading…
Reference in New Issue
Block a user