xo-object: improve GC unittest + prep to integrate w/ xo::reflect
This commit is contained in:
parent
c13b2a502c
commit
187eae521f
2 changed files with 11 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue