*ping*
Hi Steven,
the following code used to compile with older gcc versions (I just tried with 4.5 and I used the same construct with 4.7) but no more with gcc 4.8, but I don't know whether it's a gcc or type_erasure problem (or mine). The problem seems to be with rvalue refs. If I use the commented out version, it compiles fine on both compilers. Any idea? If you have no gcc 4.8, I can attach the error.
Thanks, Christophe
#include <iostream>
#include
#include #include #include #include #include #include
#include BOOST_TYPE_ERASURE_MEMBER((has_post), post);
struct any_post_concept: ::boost::mpl::vector< //has_post
), const boost::type_erasure::_self>, has_post &&), const boost::type_erasure::_self>, boost::type_erasure::relaxed, boost::type_erasure::copy_constructible<> {} ; typedef boost::type_erasure::any
any_post; struct any_impl { //void post(boost::function
f)const {f();} void post(boost::function && f)const {f();} }; int main() { any_impl s; any_post p (s); boost::function
f = [](){std::cout << "ok" << std::endl;}; //p.post(f); p.post(std::move(f)); return 0; }