#ifndef ENTT_META_POLICY_HPP #define ENTT_META_POLICY_HPP #include namespace entt { /*! @brief Empty class type used to request the _as ref_ policy. */ struct as_ref_t final { /** * @cond TURN_OFF_DOXYGEN * Internal details not to be documented. */ template static constexpr bool value = std::is_reference_v && !std::is_const_v>; /** * Internal details not to be documented. * @endcond */ }; /*! @brief Empty class type used to request the _as cref_ policy. */ struct as_cref_t final { /** * @cond TURN_OFF_DOXYGEN * Internal details not to be documented. */ template static constexpr bool value = std::is_reference_v; /** * Internal details not to be documented. * @endcond */ }; /*! @brief Empty class type used to request the _as-is_ policy. */ struct as_is_t final { /** * @cond TURN_OFF_DOXYGEN * Internal details not to be documented. */ template static constexpr bool value = true; /** * Internal details not to be documented. * @endcond */ }; /*! @brief Empty class type used to request the _as void_ policy. */ struct as_void_t final { /** * @cond TURN_OFF_DOXYGEN * Internal details not to be documented. */ template static constexpr bool value = true; /** * Internal details not to be documented. * @endcond */ }; /** * @brief Provides the member constant `value` to true if a type also is a meta * policy, false otherwise. * @tparam Type Type to check. */ template struct is_meta_policy : std::disjunction< std::is_same, std::is_same, std::is_same, std::is_same> {}; /** * @brief Helper variable template. * @tparam Type Type to check. */ template inline constexpr bool is_meta_policy_v = is_meta_policy::value; } // namespace entt #endif