xo-object: improve GC unittest + prep to integrate w/ xo::reflect

This commit is contained in:
Roland Conybeare 2025-08-06 13:53:31 -05:00
commit 187eae521f
2 changed files with 11 additions and 1 deletions

View file

@ -16,7 +16,7 @@ namespace xo {
// Defining this means ppdetail_atomic is not used.
// In that case where not explicitly specialized ppdetail will revert to ordinary printing for a type,
// instead of giving compile-time error about missing template specialization of ppdetail.
#define ppdetail_atomic ppdetail
//#define ppdetail_atomic ppdetail
struct ppindentinfo {
ppindentinfo(ppstate * pps, std::uint32_t ci0, std::uint32_t indent_width, bool upto)

View file

@ -6,8 +6,11 @@
#pragma once
#include "pretty.hpp"
#include "array.hpp" /*printing*/
#include "pad.hpp"
#include <vector>
#include <array>
#include <cstdint>
namespace xo {
namespace print {
@ -54,5 +57,12 @@ namespace xo {
return ppdetail_vector<std::vector<T>>::print_pretty(ppii, x);
}
};
template <typename T, std::size_t N>
struct ppdetail<std::array<T, N>> {
static bool print_pretty(const ppindentinfo & ppii, const std::array<T,N> & x) {
return ppdetail_vector<std::array<T, N>>::print_pretty(ppii, x);
}
};
}
}