// Boost.TypeErasure library // // Copyright 2011 Steven Watanabe // // Distributed under the Boost Software License Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // $Id: construction.cpp,v 1.4 2012/07/19 14:23:25 evansl Exp evansl $ #include #include #include #include #include #include namespace mpl = boost::mpl; using namespace boost::type_erasure; void construction2() { typedef mpl::vector< copy_constructible<_a>, typeid_<_a>, copy_constructible<_b>, copy_constructible<_c>, constructible<_a(const _b&, const _c&)> > construct; typedef mpl::map< mpl::pair<_a, std::vector >, mpl::pair<_b, std::size_t>, mpl::pair<_c, double> > types1; typedef mpl::map< mpl::pair<_a, std::deque >, mpl::pair<_b, std::size_t>, mpl::pair<_c, double> > types2; static_binding bindings1=make_binding(); static_binding bindings2=make_binding(); any size(10, bindings1); any val(2.5, bindings2); any v(size, val); std::type_info const&type_info_a=typeid_of(v); std::cout<