#pragma once #include /* keep it first to prevent nasty warns in MSVC */ #include #include #include namespace TDA{ namespace flyweights{ template struct static_holder_class:boost::flyweights::holder_marker { #ifdef __INCLUDE_HOLDER__ static C& get() { static C c; return c; } #else #error static C& get(); #endif typedef static_holder_class type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1,static_holder_class,(C)) }; /* static_holder_class specifier */ struct static_holder:boost::flyweights::holder_marker { template struct apply { typedef static_holder_class type; }; }; } /* namespace flyweights */ } /* namespace boost */