23#ifndef VCL_BASE_SERIALIZATION_STL_SERIALIZE_H
24#define VCL_BASE_SERIALIZATION_STL_SERIALIZE_H
41template<
typename T, std::
size_t N>
42void serialize(std::ostream& os,
const std::array<T, N>& a)
44 if constexpr (Serializable<T>) {
45 for (
const T& v : a) {
50 for (
const T& e : a) {
60inline void serialize(std::ostream& os,
const std::string& s)
62 std::size_t size = s.
size();
64 serializeN(os, s.data(), size);
72void serialize(std::ostream& os,
const std::vector<T>& v)
74 std::size_t size = v.
size();
76 if constexpr (Serializable<T>) {
77 for (
const T& e : v) {
82 for (
const T& e : v) {
89void serialize(std::ostream& os,
const std::vector<std::any>& v)
91 std::size_t size = v.
size();
93 if constexpr (Serializable<T>) {
94 for (
const std::any& e : v) {
95 std::any_cast<T>(e).serialize(os);
99 for (
const std::any& e : v) {
100 serialize(os, std::any_cast<T>(e));
void serialize(std::ostream &os) const
Serializes the box to the given output stream.
Definition box.h:466
PointT size() const
Computes the size of the box.
Definition box.h:267