xo-alloc2: still more header org-streamlining
This commit is contained in:
parent
cffee6b7cf
commit
1b5067d643
13 changed files with 28 additions and 15 deletions
48
xo-alloc2/include/xo/alloc2/gcobject/IGCObject_Any.hpp
Normal file
48
xo-alloc2/include/xo/alloc2/gcobject/IGCObject_Any.hpp
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/** @file IGCObject_Any.hpp
|
||||
*
|
||||
* @author Roland Conybeare, Dec 2025
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "AGCObject.hpp"
|
||||
#include <new>
|
||||
|
||||
namespace xo {
|
||||
namespace mm { struct IGCObject_Any; }
|
||||
|
||||
namespace facet {
|
||||
template <>
|
||||
struct FacetImplementation<xo::mm::AGCObject, DVariantPlaceholder> {
|
||||
using ImplType = xo::mm::IGCObject_Any;
|
||||
};
|
||||
}
|
||||
|
||||
namespace mm {
|
||||
/** @class IGCObject_Any
|
||||
* @brief AGCObject implementation for empty variant instance
|
||||
**/
|
||||
struct IGCObject_Any : public AGCObject {
|
||||
using size_type = std::size_t;
|
||||
|
||||
const AGCObject * iface() const { return std::launder(this); }
|
||||
|
||||
// from AGCObject
|
||||
int32_t _typeseq() const noexcept override { return s_typeseq; }
|
||||
|
||||
[[noreturn]] size_type shallow_size(Copaque) const noexcept override { _fatal(); }
|
||||
[[noreturn]] Opaque * shallow_copy(Copaque,
|
||||
obj<AAllocator>) const noexcept override { _fatal(); }
|
||||
[[noreturn]] size_type forward_children(Opaque) const noexcept override { _fatal(); }
|
||||
|
||||
private:
|
||||
[[noreturn]] static void _fatal();
|
||||
|
||||
public:
|
||||
static int32_t s_typeseq;
|
||||
static bool _valid;
|
||||
};
|
||||
} /*namespace mm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IGCObject_Any.hpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue