From 4dc673916796a985d3e1ef16395f8528e31583d2 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sat, 4 Apr 2026 16:33:35 -0400 Subject: [PATCH] refactor: rename shallow_copy -> shallow_move + streamline Use RCollector.std_copy_for where appropriate --- include/xo/numeric/detail/ANumeric.hpp | 5 +++++ include/xo/numeric/detail/RNumeric.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/include/xo/numeric/detail/ANumeric.hpp b/include/xo/numeric/detail/ANumeric.hpp index bda27456..7c8e0c99 100644 --- a/include/xo/numeric/detail/ANumeric.hpp +++ b/include/xo/numeric/detail/ANumeric.hpp @@ -42,6 +42,11 @@ public: /** @defgroup scm-numeric-methods **/ ///@{ // const methods + /** An uninitialized ANumeric instance will have zero vtable pointer (per {linux,osx} abi). + * Use case for this is narrow. We go to some lengths to avoid null vtable pointers. For example + * obj will have non-null vtable (via IFacet_Any) with all methods terminating. + **/ + bool _has_null_vptr() const noexcept { return *reinterpret_cast(this) == nullptr; } /** RTTI: unique id# for actual runtime data representation **/ virtual typeseq _typeseq() const noexcept = 0; /** destroy instance @p d; calls c++ dtor only for actual runtime type; does not recover memory **/ diff --git a/include/xo/numeric/detail/RNumeric.hpp b/include/xo/numeric/detail/RNumeric.hpp index 86cac666..35a704ec 100644 --- a/include/xo/numeric/detail/RNumeric.hpp +++ b/include/xo/numeric/detail/RNumeric.hpp @@ -46,6 +46,7 @@ public: ///@{ // explicit injected content + static obj multiply(obj lhs, obj rhs); // builtin methods typeseq _typeseq() const noexcept { return O::iface()->_typeseq(); }