Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 08:33:42

0001 #ifndef BOOST_HASH2_DETAIL_IS_CONSTANT_EVALUATED_HPP_INCLUDED
0002 #define BOOST_HASH2_DETAIL_IS_CONSTANT_EVALUATED_HPP_INCLUDED
0003 
0004 // Copyright 2024 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/hash2/detail/config.hpp>
0009 
0010 namespace boost
0011 {
0012 namespace hash2
0013 {
0014 namespace detail
0015 {
0016 
0017 constexpr bool is_constant_evaluated() noexcept
0018 {
0019 #if defined(BOOST_HASH2_HAS_BUILTIN_IS_CONSTANT_EVALUATED)
0020 
0021     return __builtin_is_constant_evaluated();
0022 
0023 #else
0024 
0025     return true;
0026 
0027 #endif
0028 }
0029 
0030 } // namespace detail
0031 } // namespace hash2
0032 } // namespace boost
0033 
0034 #endif // #ifndef BOOST_HASH2_DETAIL_IS_CONSTANT_EVALUATED_HPP_INCLUDED