From f3887debcaefe4ae2a7aecc7a65815452c16d2f6 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Wed, 19 Nov 2025 12:38:54 -0500 Subject: [PATCH] xo-alloc / xo-refcnt: feature flags for easy tests. --- include/xo/alloc/Object.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/xo/alloc/Object.hpp b/include/xo/alloc/Object.hpp index a29b8de5..5727331e 100644 --- a/include/xo/alloc/Object.hpp +++ b/include/xo/alloc/Object.hpp @@ -39,6 +39,11 @@ namespace xo { template gc_ptr(const gc_ptr & x) : ptr_{x.ptr()} {} + /** convenience for static asserts **/ + static constexpr bool is_gc_ptr = true; + /** see also: xo/refcnt/Refcounted.hpp **/ + static constexpr bool is_rc_ptr = false; + static bool is_eq(gc_ptr x1, gc_ptr x2) { std::uintptr_t u1 = reinterpret_cast(x1.ptr()); std::uintptr_t u2 = reinterpret_cast(x2.ptr());