File indexing completed on 2025-11-06 09:49:51
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 #ifdef BOOST_PFR_HAS_STD_MODULE
0014 import std;
0015 #else
0016 #include <type_traits> // for std::is_aggregate
0017 #endif
0018
0019 namespace boost { namespace pfr { namespace detail {
0020
0021
0022 template <class T, class WhatFor>
0023 constexpr decltype(is_reflectable<T, WhatFor>::value) possible_reflectable(long) noexcept {
0024 return is_reflectable<T, WhatFor>::value;
0025 }
0026
0027 #if BOOST_PFR_ENABLE_IMPLICIT_REFLECTION
0028
0029 template <class T, class WhatFor>
0030 constexpr bool possible_reflectable(int) noexcept {
0031 # if defined(__cpp_lib_is_aggregate)
0032 using type = std::remove_cv_t<T>;
0033 return std::is_aggregate<type>();
0034 # else
0035 return true;
0036 # endif
0037 }
0038
0039 #else
0040
0041 template <class T, class WhatFor>
0042 constexpr bool possible_reflectable(int) noexcept {
0043
0044 return false;
0045 }
0046
0047 #endif
0048
0049 }}}
0050
0051 #endif
0052
0053