xo-alloc xo-object: + Object.self_tp

This commit is contained in:
Roland Conybeare 2025-08-06 14:11:28 -05:00
commit 150bfa4aa2
11 changed files with 76 additions and 14 deletions

View file

@ -4,11 +4,16 @@
*/
#include "Boolean.hpp"
#include "TaggedPtr.hpp"
#include "xo/reflect/Reflect.hpp"
#include <array>
#include <cassert>
#include <cstddef>
namespace xo {
using xo::reflect::Reflect;
using xo::reflect::TaggedPtr;
namespace obj {
gp<Boolean>
Boolean::boolean_obj(bool x)
@ -31,6 +36,12 @@ namespace xo {
return boolean_obj(false);
}
TaggedPtr
Boolean::self_tp() const
{
return Reflect::make_tp(const_cast<Boolean*>(this));
}
std::size_t
Boolean::_shallow_size() const
{