36 template <
template <
bool>
class Archive>
40 ar.serialize_varint(size);
41 if (ar.remaining_bytes() < size)
43 ar.stream().setstate(std::ios::failbit);
47 std::unique_ptr<std::string::value_type[]>
buf(
new std::string::value_type[size]);
48 ar.serialize_blob(
buf.get(), size);
50 str.append(
buf.get(), size);
55 template <
template <
bool>
class Archive>
58 size_t size = str.size();
59 ar.serialize_varint(size);
60 ar.serialize_blob(const_cast<std::string::value_type*>(str.c_str()), size);
bool do_serialize(Archive< false > &ar, std::string &str)
Simple DSL AAPI based on.