9 auto iter = map.find(val.type());
10 if(iter == map.end()){
11 std::cerr <<
"ERROR: MUQ does not know how to write a boost::any with underlying type \"" << val.type().name() <<
"\". Currently implemented types are:\n";
12 for(
auto mapIter = map.begin(); mapIter!=map.end(); ++mapIter)
13 std::cerr <<
" " << mapIter->first.name() << std::endl;
14 std::cerr << std::endl;
16 assert(iter != map.end());
19 map[val.type()](val, *
this);
26 static std::shared_ptr<BlockDataset::AnyWriterMapType> map;
29 map = std::make_shared<BlockDataset::AnyWriterMapType>();
REGISTER_HDF5BLOCK_ANYTYPE(double, double) REGISTER_HDF5BLOCK_ANYTYPE(float
std::unordered_map< std::type_index, AnyWriterType > AnyWriterMapType
static std::shared_ptr< AnyWriterMapType > GetAnyWriterMap()
BlockDataset & operator=(boost::any const &val)