Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-16 09:07:42

0001 #ifndef BOOST_ENDIAN_DETAIL_IS_SCOPED_ENUM_HPP_INCLUDED
0002 #define BOOST_ENDIAN_DETAIL_IS_SCOPED_ENUM_HPP_INCLUDED
0003 
0004 // Copyright 2020 Peter Dimov
0005 //
0006 // Distributed under the Boost Software License, Version 1.0.
0007 // https://www.boost.org/LICENSE_1_0.txt
0008 
0009 #include <type_traits>
0010 
0011 namespace boost
0012 {
0013 namespace endian
0014 {
0015 namespace detail
0016 {
0017 
0018 template<class T> struct negation: std::integral_constant<bool, !T::value> {};
0019 
0020 template<class T> struct is_scoped_enum:
0021     std::conditional<
0022         std::is_enum<T>::value,
0023         negation< std::is_convertible<T, int> >,
0024         std::false_type
0025     >::type
0026 {
0027 };
0028 
0029 } // namespace detail
0030 } // namespace endian
0031 } // namespace boost
0032 
0033 #endif  // BOOST_ENDIAN_DETAIL_IS_SCOPED_ENUM_HPP_INCLUDED