13#ifndef ML_LIGHTWEIGHT_H
14#define ML_LIGHTWEIGHT_H
27#include <boost/ref.hpp>
28#include <boost/tuple/tuple.hpp>
29#include <boost/variant.hpp>
30#include <boost/mpl/contains.hpp>
31#include <boost/mpl/for_each.hpp>
32#include <boost/mpl/less_equal.hpp>
33#include <boost/mpl/integral_c.hpp>
34#include <boost/mpl/vector.hpp>
35#include <boost/mpl/sizeof.hpp>
59 operator T&() {
return *_value; }
60 operator const T&()
const {
return *_value; }
82 typedef typename boost::mpl::if_<
83 typename boost::mpl::less_equal<boost::mpl::sizeof_<T>, boost::mpl::int_<8> >
::type,
91 template<
typename VisitorType>
106 template<
typename VisitorType,
typename VariantType>
wrapper for large objects (i.e.
heap_storage(const SelfType &other)
SelfType & operator=(const SelfType &other)
bool operator==(const SelfType &other) const
SelfType & operator=(const T &other)
heap_storage(const T &value=T())
heap_storage< T > SelfType
bool operator!=(const SelfType &other) const
VisitorType::result_type result_type
lightweight_visitor(VisitorType &visitor)
result_type operator()(T &value)
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
#define VESSELGRAPH_END_NAMESPACE
#define VESSELGRAPH_BEGIN_NAMESPACE
Namespace lightweight, provides utilities to wrap large objects in a lightweight variant whose static...
VisitorType::result_type apply_visitor(VisitorType &visitor, VariantType &value)
boost::mpl::if_< typenameboost::mpl::less_equal< boost::mpl::sizeof_< T >, boost::mpl::int_< 8 > >::type, T, heap_storage< T > >::type type