xo-facet: typeseq strongly typed

This commit is contained in:
Roland Conybeare 2026-01-02 09:52:16 -05:00
commit 3af1cf1bda
12 changed files with 38 additions and 24 deletions

View file

@ -1,4 +1,4 @@
/** @file IAllocIter_Any.hpp
/** @file IAllocIterator_Any.hpp
*
* @author Roland Conybeare, Dec 2025
**/
@ -20,10 +20,12 @@ namespace xo {
* @brief AllocIterator implementation for empty variant instance
**/
struct IAllocIterator_Any : public AAllocIterator {
using typeseq = xo::facet::typeseq;
const AAllocIterator * iface() const { return std::launder(this); }
// from AAllocIterator
int32_t _typeseq() const noexcept override { return s_typeseq; }
typeseq _typeseq() const noexcept override { return s_typeseq; }
// const methods
[[noreturn]] AllocInfo deref(Copaque) const noexcept override { _fatal(); }
@ -37,10 +39,10 @@ namespace xo {
[[noreturn]] static void _fatal();
public:
static int32_t s_typeseq;
static typeseq s_typeseq;
static bool _valid;
};
} /*namespace mm*/
} /*namespace xo*/
/* end IAllocIter_Any.hpp */
/* end IAllocIterator_Any.hpp */