blob: 39b32e17895a33b9efc8605e46f46370a67cabb4 [file] [log] [blame]
[/
Copyright 2020 Glen Joseph Fernandes
(glenjofe@gmail.com)
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).
]
[section:is_unscoped_enum is_unscoped_enum]
template<class T>
struct is_unscoped_enum
: __tof { };
__inherit If T is a (possibly cv-qualified) unscoped enumeration type
(`enum` but not `enum class`), then inherits from __true_type, otherwise
inherits from __false_type.
__header `#include <boost/type_traits/is_unscoped_enum.hpp>`
[all_compilers]
__examples
[:Given: `enum color { red, blue };` and `enum class fruit { apple, orange };`]
[:`is_unscoped_enum<color>` inherits from `__true_type`.]
[:`is_unscoped_enum<fruit>` inherits from `__false_type`.]
[:`is_unscoped_enum<color const>::type` is the type `__true_type`.]
[:`is_unscoped_enum<color>::value` is an integral constant expression that
evaluates to /true/.]
[:`is_unscoped_enum<color&>::value` is an integral constant expression that
evaluates to /false/.]
[:`is_unscoped_enum<color*>::value` is an integral constant expression that
evaluates to /false/.]
[:`is_unscoped_enum<T>::value_type` is the type `bool`.]
[endsect]