|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r73978 - sandbox/enums/libs/enums/test/enum_class
From: vicente.botet_at_[hidden]
Date: 2011-08-21 05:29:18
Author: viboes
Date: 2011-08-21 05:29:14 EDT (Sun, 21 Aug 2011)
New Revision: 73978
URL: http://svn.boost.org/trac/boost/changeset/73978
Log:
boost::is_enum test showing the bug
Text files modified:
sandbox/enums/libs/enums/test/enum_class/is_enum_pass.cpp | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
Modified: sandbox/enums/libs/enums/test/enum_class/is_enum_pass.cpp
==============================================================================
--- sandbox/enums/libs/enums/test/enum_class/is_enum_pass.cpp (original)
+++ sandbox/enums/libs/enums/test/enum_class/is_enum_pass.cpp 2011-08-21 05:29:14 EDT (Sun, 21 Aug 2011)
@@ -12,12 +12,22 @@
#include "./EnumClass.hpp"
#include <boost/static_assert.hpp>
-#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_enum.hpp>
+
+//enum E {E_a,E_b,E_c};
+//BOOST_STATIC_ASSERT((boost::is_enum<E>::value));
+//enum class EC {a,b,c};
+//BOOST_STATIC_ASSERT((boost::is_enum<EC>::value));
+
+//#include <type_traits>
+//BOOST_STATIC_ASSERT((std::is_enum<E>::value));
+//BOOST_STATIC_ASSERT((std::is_enum<EC>::value));
void pass() {
using namespace boost::enums;
{ // has the same size as the underlying type
+ //BOOST_STATIC_ASSERT((std::is_enum<EnumClass>::value));
BOOST_STATIC_ASSERT((boost::enums::is_enum<EnumClass>::value));
BOOST_STATIC_ASSERT((!boost::enums::is_enum<int>::value));
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk