Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:30:41

0001 #ifndef BOOST_DESCRIBE_ENUMERATORS_HPP_INCLUDED
0002 #define BOOST_DESCRIBE_ENUMERATORS_HPP_INCLUDED
0003 
0004 // Copyright 2020, 2021 Peter Dimov
0005 // Distributed under the Boost Software License, Version 1.0.
0006 // https://www.boost.org/LICENSE_1_0.txt
0007 
0008 #include <boost/describe/detail/void_t.hpp>
0009 #include <boost/describe/detail/config.hpp>
0010 
0011 #if defined(BOOST_DESCRIBE_CXX11)
0012 
0013 #include <type_traits>
0014 
0015 namespace boost
0016 {
0017 namespace describe
0018 {
0019 
0020 // describe_enumerators<E>
0021 
0022 template<class E> using describe_enumerators = decltype( boost_enum_descriptor_fn( static_cast<E**>(0) ) );
0023 
0024 // has_describe_enumerators<E>
0025 
0026 namespace detail
0027 {
0028 
0029 template<class E, class En = void> struct has_describe_enumerators: std::false_type
0030 {
0031 };
0032 
0033 template<class E> struct has_describe_enumerators<E, void_t<describe_enumerators<E>>>: std::true_type
0034 {
0035 };
0036 
0037 } // namespace detail
0038 
0039 template<class E> using has_describe_enumerators = detail::has_describe_enumerators<E>;
0040 
0041 } // namespace describe
0042 } // namespace boost
0043 
0044 #endif // defined(BOOST_DESCRIBE_CXX11)
0045 
0046 #endif // #ifndef BOOST_DESCRIBE_ENUMERATORS_HPP_INCLUDED