unique_ptr を配列にシリアル化する方法に関するドキュメントを見つけることができませんでした。どんな助けでも素晴らしいでしょう。
struct Counter{
int index;
unique_ptr<char []> name;
template<class Archive>
void serialize(Archive & archive){
archive(index, name ); // serialize things by passing them to the archive
}
};
割り当て方法。
auto buffer = std::unique_ptr<char[]>(new char[BUFFER_SIZE]);
instance.name = std::move(buffer);