39#include <boost/variant/variant.hpp>
40#include <boost/variant/apply_visitor.hpp>
41#include <boost/variant/static_visitor.hpp>
42#include <boost/mpl/empty.hpp>
43#include <boost/mpl/if.hpp>
44#include <boost/mpl/front.hpp>
45#include <boost/mpl/pop_front.hpp>
54template <
class Archive,
class T>
63template <
class Archive,
class Variant,
class TBegin,
class TEnd>
67 typedef typename boost::mpl::next<TBegin>::type
TNext;
91template <
class Archive,
class Variant,
class TBegin>
104template <
template <
bool>
class Archive, BOOST_VARIANT_ENUM_PARAMS(
typename T)>
109 typedef typename variant_type::types
types;
116 typename boost::mpl::begin<types>::type,
117 typename boost::mpl::end<types>::type>::read(
ar, v, t))
127template <
template <
bool>
class Archive, BOOST_VARIANT_ENUM_PARAMS(
typename T)>
133 struct visitor :
public boost::static_visitor<bool>
140 bool operator ()(
T &rv)
const
155 return boost::apply_visitor(visitor(
ar), v);
binary_archive< false > ar
Definition: cold-outputs.cpp:54
bool do_serialize(Archive< false > &ar, std::vector< T > &v)
Definition: containers.h:109
Definition: portable_binary_archive.hpp:29
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1124
Simple DSL AAPI based on.
#define true
Definition: stdbool.h:36
#define false
Definition: stdbool.h:37
void read_variant_tag(variant_tag_type &t)
Definition: binary_archive.h:165
void set_fail() noexcept
Definition: binary_archive.h:100
void end_variant()
Definition: binary_archive.h:75
void begin_variant()
Definition: binary_archive.h:74
variant_type::types types
Definition: variant.h:109
Archive< false >::variant_tag_type variant_tag_type
Definition: variant.h:108
boost::variant< BOOST_VARIANT_ENUM_PARAMS(T)> variant_type
Definition: variant.h:107
static bool serialize(Archive< false > &ar, variant_type &v)
Definition: variant.h:111
Archive< true > & ar
Definition: variant.h:135
visitor(Archive< true > &a)
Definition: variant.h:137
boost::variant< BOOST_VARIANT_ENUM_PARAMS(T)> variant_type
Definition: variant.h:130
static bool serialize(Archive< true > &ar, variant_type &v)
Definition: variant.h:154
... wouldn't a class be better?
Definition: serialization.h:93
Archive::variant_tag_type variant_tag_type
Definition: variant.h:94
static bool read(Archive &ar, Variant &v, variant_tag_type t)
Definition: variant.h:96
reads a variant
Definition: variant.h:65
boost::mpl::deref< TBegin >::type current_type
Definition: variant.h:68
Archive::variant_tag_type variant_tag_type
Definition: variant.h:66
static bool read(Archive &ar, Variant &v, variant_tag_type t)
Definition: variant.h:71
boost::mpl::next< TBegin >::type TNext
Definition: variant.h:67