wasabi123
wasabi123

Reputation: 173

how could I serialize boost tuple?

when trying to broad cast an element with boost_tuple using boost mpi:

broadcast(world,J,0);

I have the error:

/usr/local/include/boost/serialization/access.hpp:118:9: error: 'class boost::tuples::tuple<int, int, int, int, int>' has no member named 'serialize'
         t.serialize(ar, file_version);

What could I do? Thank you.

Upvotes: 2

Views: 1826

Answers (1)

sehe
sehe

Reputation: 393809

You can do the analogous to Does boost support serialization of c++11's std::tuple?

Alternatively, use c++14 std::index_sequence with c++17's generalized fold expressions.

Upvotes: 2

Related Questions