Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct template is_reflectable

pfr::is_reflectable

Synopsis

// In header: <pfr/traits_fwd.hpp>

template<typename T, typename WhatFor> 
struct is_reflectable {
};

Description

Has a static const member variable value when it is known that type T can or can't be reflected using Boost.PFR; otherwise, there is no member variable. Every user may (and in some difficult cases - should) specialize is_reflectable on his own.

Example:

namespace pfr {
    template<class All> struct is_reflectable<A, All> : std::false_type {};       // 'A' won't be interpreted as reflectable everywhere
    template<> struct is_reflectable<B, boost_fusion_tag> : std::false_type {};   // 'B' won't be interpreted as reflectable in only Boost Fusion
}}

[Note] Note

is_reflectable affects is_implicitly_reflectable, the decision made by is_reflectable is used by is_implicitly_reflectable.


PrevUpHomeNext