#include <memory>
#include "serialization.h"
Go to the source code of this file.
◆ do_serialize() [1/2]
template<template< bool > class Archive>
| bool do_serialize |
( |
Archive< false > & |
ar, |
|
|
std::string & |
str |
|
) |
| |
|
inline |
Definition at line 37 of file string.h.
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);
◆ do_serialize() [2/2]
template<template< bool > class Archive>
| bool do_serialize |
( |
Archive< true > & |
ar, |
|
|
std::string & |
str |
|
) |
| |
|
inline |
Definition at line 56 of file string.h.
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);