fix a warning after C++11 transition (#898)
it is still questionable why GCC emits the warning "enumeral and non enumeral constant in comparison" since both arguments of the comparison are enum constants. I've asked that question on stackoverflow.... http://stackoverflow.com/questions/29685367/reasoning-behind-enumeral-and-non-enumeral-type-in-conditional-expression
This commit is contained in:
parent
413a6a5d48
commit
8794aec35a
1 changed files with 5 additions and 6 deletions
|
|
@ -79,15 +79,14 @@ namespace meta {
|
|||
template<>
|
||||
struct maxSize<NullType>
|
||||
{
|
||||
enum{ value = 0 };
|
||||
static constexpr int value = 0;
|
||||
};
|
||||
template<class TY, class TYPES>
|
||||
struct maxSize<Node<TY,TYPES> >
|
||||
{
|
||||
enum{ thisval = sizeof(TY)
|
||||
, nextval = maxSize<TYPES>::value
|
||||
, value = nextval > thisval? nextval:thisval
|
||||
};
|
||||
static constexpr size_t thisval = sizeof(TY);
|
||||
static constexpr size_t nextval = maxSize<TYPES>::value;
|
||||
static constexpr size_t value = nextval > thisval? nextval:thisval;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -115,7 +114,7 @@ namespace meta {
|
|||
|
||||
/** convenience shortcut: query function */
|
||||
template<typename TY, typename TYPES>
|
||||
bool
|
||||
constexpr bool
|
||||
isInList()
|
||||
{
|
||||
return IsInList<TY,TYPES>::value;
|
||||
|
|
|
|||
Loading…
Reference in a new issue