Boost.Geometry    Boost C++ Libraries
boost::geometry::compress_variant< Variant > Struct Template Reference

Meta-function that takes a boost::variant type and tries to minimize it by doing the following: More...

Inheritance diagram for boost::geometry::compress_variant< Variant >:
boost::geometry::detail::variant_or_single< detail::unique_types< Variant >::type >

Detailed Description

template<typename Variant>
struct boost::geometry::compress_variant< Variant >

Meta-function that takes a boost::variant type and tries to minimize it by doing the following:

Example
typedef variant<int, float, int, long> variant_type;
typedef compress_variant<variant_type>::type compressed;
typedef boost::mpl::vector<int, float, long> result_types;
BOOST_MPL_ASSERT(( boost::mpl::equal<compressed::types, result_types> ));
typedef variant<int, int, int> one_type_variant_type;
typedef compress_variant<one_type_variant_type>::type single_type;
BOOST_MPL_ASSERT(( boost::equals<single_type, int> ));

April 2, 2011

Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands
Copyright © 2008-2011 Bruno Lalande, Paris, France
Copyright © 2009-2010 Mateusz Loskot, London, UK
Documentation is generated by Doxygen