Using boost serialization with armadillo datum::nan value

筅森魡賤 提交于 2019-12-12 18:11:47

问题


I use boost serialization in my C++ / CLI program, and some classes have datamembers that contain some double which are initialized to arma::datum::nan (the "not-a-number" value for armadillo library). I serialize via a boost::archive::text_oarchive. When I try to deserialize via boost::archive::text_iarchive oa, a boost serialization archive exception is launched when it tries to read a arma::datum::nan value. I tried using a binary archive, but it seems other types (std::vector> for instance) are not supported. Is there a way I could tell boost how to serialize and deserialize a arma::datum::nan value ?

来源:https://stackoverflow.com/questions/38231895/using-boost-serialization-with-armadillo-datumnan-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!