2012-09-27から1日間の記事一覧

Boost.TypeErasure の any でデフォルトコンストラクタを使用する

any のデフォルトコンストラクタを使用する場合は Concept に relaxed_match を定義する必要があります。 [ソース] #include <boost/type_erasure/any.hpp> #include <boost/type_erasure/member.hpp> #include <boost/mpl/vector.hpp> #include <iostream> BOOST_TYPE_ERASURE_MEMBER((has_call), call, 1) struct X { void call(int n){ std::cout << "X</iostream></boost/mpl/vector.hpp></boost/type_erasure/member.hpp></boost/type_erasure/any.hpp>…