//Purpose: // Test rebind_any // #include #include #include #include #include #include #include #include #include namespace mpl = boost::mpl; namespace te = boost::type_erasure; int main() { typedef te::any< mpl::vector< te::copy_constructible<>, te::typeid_<>, te::addable<> > > AnyB; typedef int self_t; self_t self_v; std::cout<<"creating b_self\n"; AnyB b_self(self_v); #if 1 typedef te::rebind_any::type b_type; #else typedef self_t b_type; #endif std::cout<<"creating b_copy\n"; AnyB b_copy(te::any_cast(b_self)); return 0; }