1 #ifndef BOOST_ENDIAN_DETAIL_IS_SCOPED_ENUM_HPP_INCLUDED
2 #define BOOST_ENDIAN_DETAIL_IS_SCOPED_ENUM_HPP_INCLUDED
4 // Copyright 2020 Peter Dimov
6 // Distributed under the Boost Software License, Version 1.0.
7 // https://www.boost.org/LICENSE_1_0.txt
9 #include <boost/type_traits/conditional.hpp>
10 #include <boost/type_traits/is_enum.hpp>
11 #include <boost/type_traits/is_convertible.hpp>
20 template<class T> struct negation: boost::integral_constant<bool, !T::value> {};
22 template<class T> struct is_scoped_enum:
24 boost::is_enum<T>::value,
25 negation< boost::is_convertible<T, int> >,
35 #endif // BOOST_ENDIAN_DETAIL_IS_SCOPED_ENUM_HPP_INCLUDED