$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r70200 - in sandbox/enums/libs/enums/test: . enum_class enum_type
From: vicente.botet_at_[hidden]
Date: 2011-03-19 12:47:47
Author: viboes
Date: 2011-03-19 12:47:46 EDT (Sat, 19 Mar 2011)
New Revision: 70200
URL: http://svn.boost.org/trac/boost/changeset/70200
Log:
Enums: Added is_enum<> meta-function tests
Added:
   sandbox/enums/libs/enums/test/enum_class/is_enum_pass.cpp   (contents, props changed)
   sandbox/enums/libs/enums/test/enum_type/is_enum_pass.cpp   (contents, props changed)
Text files modified: 
   sandbox/enums/libs/enums/test/Jamfile.v2 |     2 ++                                      
   1 files changed, 2 insertions(+), 0 deletions(-)
Modified: sandbox/enums/libs/enums/test/Jamfile.v2
==============================================================================
--- sandbox/enums/libs/enums/test/Jamfile.v2	(original)
+++ sandbox/enums/libs/enums/test/Jamfile.v2	2011-03-19 12:47:46 EDT (Sat, 19 Mar 2011)
@@ -48,6 +48,7 @@
         [ compile enum_class/inside_union_cons.pass.cpp ]
         [ compile-fail enum_class/enum_inside_union_cons.fail.cpp ]
         [ compile enum_class/enum_inside_union_cons.pass.cpp ]
+        [ compile enum_class/is_enum_pass.cpp ]
 
         [ run enum_class/cons/default_to_0_pass.cpp ]
         [ run enum_class/cons/from_enum_pass.cpp ]
@@ -84,6 +85,7 @@
         [ compile enum_type/inside_union_cons.pass.cpp : : enum_type__inside_union_cons_pass ]
         [ compile-fail enum_type/enum_inside_union_cons.fail.cpp : : enum_type__enum_inside_union_cons_fail ]
         [ compile enum_type/enum_inside_union_cons.pass.cpp : : enum_type__enum_inside_union_cons_pass ]
+        [ compile enum_class/is_enum_pass.cpp : : enum_type__is_enum_pass ]
 
         [ run enum_type/cons/default_to_0_pass.cpp : : : : enum_type__cons__default_to_0_pass ]
         [ run enum_type/cons/from_enum_pass.cpp : : : : enum_type__cons__from_enum_pass ]
Added: sandbox/enums/libs/enums/test/enum_class/is_enum_pass.cpp
==============================================================================
--- (empty file)
+++ sandbox/enums/libs/enums/test/enum_class/is_enum_pass.cpp	2011-03-19 12:47:46 EDT (Sat, 19 Mar 2011)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2011.
+// Distributed under the Boost
+// Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or
+// copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/enums for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#include "./EnumClass.hpp"
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+void pass() {
+  using namespace boost::enums;
+
+  { // has the same size as the underlying type
+    BOOST_STATIC_ASSERT((boost::enums::is_enum<EnumClass>::value));
+    BOOST_STATIC_ASSERT((!boost::enums::is_enum<int>::value));
+  }
+
+}
Added: sandbox/enums/libs/enums/test/enum_type/is_enum_pass.cpp
==============================================================================
--- (empty file)
+++ sandbox/enums/libs/enums/test/enum_type/is_enum_pass.cpp	2011-03-19 12:47:46 EDT (Sat, 19 Mar 2011)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2011.
+// Distributed under the Boost
+// Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or
+// copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/enums for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#include "./EnumType.hpp"
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+void pass() {
+  using namespace boost::enums;
+
+  { // has the same size as the underlying type
+    BOOST_STATIC_ASSERT((boost::enums::is_enum<EnumClass>::value));
+    BOOST_STATIC_ASSERT((!boost::enums::is_enum<int>::value));
+  }
+
+}