blob: 911a33d5416f810ec8c3cef0b257d5ef7d66c77a [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_scoped_enum is_scoped_enum]
template<class T>
struct is_scoped_enum
: __tof { };
__inherit If T is a (possibly cv-qualified) scoped enumeration type
(`enum class` but not `enum`), then inherits from __true_type, otherwise
inherits from __false_type.
__header `#include <boost/type_traits/is_scoped_enum.hpp>`
[all_compilers]
__examples
[:Given: `enum class color { red, blue };` and `enum fruit { apple, orange };`]
[:`is_scoped_enum<color>` inherits from `__true_type`.]
[:`is_scoped_enum<fruit>` inherits from `__false_type`.]
[:`is_scoped_enum<color const>::type` is the type `__true_type`.]
[:`is_scoped_enum<color>::value` is an integral constant expression that
evaluates to /true/.]
[:`is_scoped_enum<color&>::value` is an integral constant expression that
evaluates to /false/.]
[:`is_scoped_enum<color*>::value` is an integral constant expression that
evaluates to /false/.]
[:`is_scoped_enum<T>::value_type` is the type `bool`.]
[endsect]