
I've added namespace boost { namespace mpi { template<> struct is_mpi_datatype<std::string> : public mpl::true_ { }; } } and everything works fine... 2009/7/4 Mathieu Larose <mat087@gmail.com>:
Hello,
I'm trying to register a class (named A), because it will be a derived class. Calling BOOST_CLASS_EXPORT(A) will generate a lot of errors that look similar. Here is one of them:
/usr/local/include/boost/mpi/datatype.hpp:184: error: no matching function for call to ‘assertion_failed(mpl_::failed************ boost::mpi::is_mpi_datatype<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::************)’
Here is the code:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #include <iostream> #include <boost/mpi.hpp> #include <boost/archive/text_iarchive.hpp> #include <boost/archive/text_oarchive.hpp> #include <boost/mpi/packed_oarchive.hpp> #include <boost/mpi/packed_iarchive.hpp> #include <boost/serialization/export.hpp> #include <boost/serialization/string.hpp>
class A { friend class boost::serialization::access;
template<class Archive> void serialize(Archive & ar, const unsigned int version) { ar & _text; } };
BOOST_CLASS_EXPORT(A); // I need to export A, because I will use // abstract base pointer. A is not a derived // class for simplicity here.
int main(int argc, char * argv[]) { return 0; }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I've found that someone had the same problem ( http://groups.google.com/group/boost-list/msg/c9a0c133bddd783d ), but no solution was found.
What am I doing wrong?
Thanks, Mathieu Larose