File indexing completed on 2025-01-18 09:43:38
0001
0002
0003
0004
0005
0006 #ifndef BOOST_PFR_DETAIL_POSSIBLE_REFLECTABLE_HPP
0007 #define BOOST_PFR_DETAIL_POSSIBLE_REFLECTABLE_HPP
0008 #pragma once
0009
0010 #include <boost/pfr/detail/config.hpp>
0011 #include <boost/pfr/traits_fwd.hpp>
0012
0013 #include <type_traits> // for std::is_aggregate
0014
0015 namespace boost { namespace pfr { namespace detail {
0016
0017
0018 template <class T, class WhatFor>
0019 constexpr decltype(is_reflectable<T, WhatFor>::value) possible_reflectable(long) noexcept {
0020 return is_reflectable<T, WhatFor>::value;
0021 }
0022
0023 #if BOOST_PFR_ENABLE_IMPLICIT_REFLECTION
0024
0025 template <class T, class WhatFor>
0026 constexpr bool possible_reflectable(int) noexcept {
0027 # if defined(__cpp_lib_is_aggregate)
0028 using type = std::remove_cv_t<T>;
0029 return std::is_aggregate<type>();
0030 # else
0031 return true;
0032 # endif
0033 }
0034
0035 #else
0036
0037 template <class T, class WhatFor>
0038 constexpr bool possible_reflectable(int) noexcept {
0039
0040 return false;
0041 }
0042
0043 #endif
0044
0045 }}}
0046
0047 #endif
0048
0049