diff --git a/xo-alloc2/include/xo/alloc2/CollectorTypeRegistry.hpp b/xo-alloc2/include/xo/alloc2/CollectorTypeRegistry.hpp index 4474e20c..2b3bd4b7 100644 --- a/xo-alloc2/include/xo/alloc2/CollectorTypeRegistry.hpp +++ b/xo-alloc2/include/xo/alloc2/CollectorTypeRegistry.hpp @@ -59,7 +59,7 @@ namespace xo { void register_types(init_function_type init_fn); /** register known GC-aware types with @p gc. - * Calls @c gc.isntall_type() for each + * Calls @c gc.install_type() for each * such type. **/ bool install_types(obj gc); diff --git a/xo-stringtable2/include/xo/stringtable2/DUniqueString.hpp b/xo-stringtable2/include/xo/stringtable2/DUniqueString.hpp index 9f56a9c9..9a4357e0 100644 --- a/xo-stringtable2/include/xo/stringtable2/DUniqueString.hpp +++ b/xo-stringtable2/include/xo/stringtable2/DUniqueString.hpp @@ -55,6 +55,8 @@ namespace xo { /** not copyable **/ DUniqueString(const DUniqueString &) = delete; + static constexpr bool is_gc_eligible() { return false; } + ///@} /** @defgroup duniquestring-methods methods **/ ///@{ diff --git a/xo-stringtable2/include/xo/stringtable2/StringTable.hpp b/xo-stringtable2/include/xo/stringtable2/StringTable.hpp index 2a0d5705..f7e0fc1c 100644 --- a/xo-stringtable2/include/xo/stringtable2/StringTable.hpp +++ b/xo-stringtable2/include/xo/stringtable2/StringTable.hpp @@ -31,6 +31,9 @@ namespace xo { StringTable(size_type hint_max_capacity, bool debug_flag = false); + /** false -> not eligible for GC (maps own memory + not moveable) **/ + static constexpr bool is_gc_eligible() { return false; } + /** lookup interned string; nullptr if not present **/ const DUniqueString * lookup(std::string_view key) const;