22 CArchive& operator<<(CArchive& out, const std::optional<T>& obj)
25 out << obj.has_value();
26 if (obj.has_value())
out << *obj;
34 std::string pref, stored_T;
36 if (pref !=
"std::optional")
38 "Error: serialized std::optional<%s>'s preamble is wrong: '%s'",
43 "Error: serialized std::optional type %s != %s", stored_T.c_str(),
#define THROW_EXCEPTION(msg)
std::string std::string format(std::string_view fmt, ARGS &&... args)
CArchive & operator>>(CArchive &s, mrpt::aligned_std_vector< float > &a)
Virtual base class for "archives": classes abstracting I/O streams.
mrpt::vision::TStereoCalibResults out