![]() |
Home | Libraries | People | FAQ | More |
Determine if T can be treated
like a sequence during conversions.
Defined in header <boost/json/conversion.hpp>
template< class T> struct is_sequence_like;
Given t, a glvalue of type
T, if
It, the type denoted
by decltype(std::begin(t)),
std::iterator_traits<It>::iterator_category is well-formed and
denotes a type; and
decltype(std::end(t))
also denotes the type It;
and
std::iterator_traits<It>::value_type is not T;
and
then the trait provides the member constant value
that is equal to true. Otherwise,
value is equal to false.
Users can specialize the trait for their own types if they don't want them to be treated like sequences. For example:
namespace boost { namespace json { template <> struct is_sequence_like<your::container> : std::false_type { }; } // namespace boost } // namespace json
Any SequenceContainer, array types.
Convenience header <boost/json.hpp>