
6 Mar
2017
6 Mar
'17
11:59 a.m.
Hello! I want to return type_erasure::any from a member function of a struct adapted by that same any. How can I do this? #include <boost/type_erasure/any.hpp> #include <boost/type_erasure/callable.hpp> using my_any = boost::type_erasure::any< boost::mpl::vector< boost::type_erasure::copy_constructible<>, boost::type_erasure::assignable<>, boost::type_erasure::callable<? ? ?> >
;
struct s { my_any operator()(my_any v) { return v; } }; int main() { my_any t = s{}; t = t(t); } Thanks.