id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 13456,Object tracking fails with pointer to variant's content,Ricardo Calheiros de Miranda Cosme ,Robert Ramey,"Object tracking fails with a pointer to an object contained into a variant that is an element of a container which loads the value_type into a local object. For example a map with a variant as a mapped_type. There is a pull request: https://github.com/boostorg/serialization/pull/96 Demo: {{{ struct Foo { int i; template void serialize(Archive& ar, const unsigned int version) { ar & i; } }; int main() { using map_t = std::unordered_map>; std::string testfile{""/tmp/serialized""}; { map_t map{{""key"", Foo{5}}}; auto ptr = &boost::strict_get(map.begin()->second); std::ofstream os(testfile); boost::archive::text_oarchive oa(os); oa << map; oa << ptr; } { std::ifstream is(testfile, (std::ios_base::openmode)0); boost::archive::text_iarchive ia(is, 0); map_t map; Foo* ptr; ia >> map; ia >> ptr; assert(ptr->i == 5); } } }}} ",Bugs,new,To Be Determined,serialization,Boost Development Trunk,Problem,,variant tracking,