6 #ifndef TURI_SERIALIZE_GL_STRING_HPP 7 #define TURI_SERIALIZE_GL_STRING_HPP 9 #include <core/storage/serialization/iarchive.hpp> 10 #include <core/storage/serialization/oarchive.hpp> 11 #include <core/storage/serialization/iterator.hpp> 12 #include <core/generics/gl_string.hpp> 16 namespace archive_detail {
19 template <
typename OutArcType>
20 struct serialize_impl<OutArcType, gl_string, false> {
21 static void exec(OutArcType& oarc,
const gl_string& s) {
22 size_t length = s.length();
25 oarc.write(reinterpret_cast<const char*>(s.data()), (std::streamsize)length);
33 template <
typename InArcType>
34 struct deserialize_impl<InArcType, gl_string, false> {
35 static void exec(InArcType& iarc, gl_string& s) {
42 iarc.read(&(s[0]), (std::streamsize)length);
#define DASSERT_FALSE(cond)