This is a header-only C++11 template library. To use it, all you need to
do is add the include folder
to your include path. Then use the following includes in your code.
#include <strict_variant/variant_fwd.hpp>
Forward declares the variant
type, recursive_wrapper
type.
#include <strict_variant/variant.hpp>
Defines the variant type, as well as apply_visitor,
get, get_or_default functions.
#include <strict_variant/recursive_wrapper.hpp>
Similar to boost::recursive_wrapper, but for this variant
type.
#include <strict_variant/variant_compare.hpp>
Gets a template type variant_comparator,
which is appropriate to use with std::map
or std::set.
By default strict_variant::variant
is not comparable.
#include <strict_variant/variant_hash.hpp>Makes variant hashable. By default this is not brought in.
#include <strict_variant/variant_stream_ops.hpp>
Gets ostream operations for the variant template type.
By default strict_variant::variant
is not streamable.
#include <strict_variant/variant_spirit.hpp>
Defines customization points within boost::spirit
so that strict_variant::variant
can be used just like boost::variant
in your qi grammars.
#include <strict_variant/multivisit.hpp>
Needed to support multi-visitation. Unary visitation is already brought
in by strict_variant/variant.hpp.
Multi-visitation means that a series of variants are passed along with a visitor, and value of each is determined and forwarded to the visitor.