xo-alloc xo-object: + Object.self_tp
This commit is contained in:
parent
ea60d107e8
commit
150bfa4aa2
11 changed files with 76 additions and 14 deletions
|
|
@ -4,11 +4,15 @@
|
|||
**/
|
||||
|
||||
#include "List.hpp"
|
||||
#include "xo/reflect/Reflect.hpp"
|
||||
#include "xo/indentlog/scope.hpp"
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
|
||||
namespace xo {
|
||||
using xo::reflect::Reflect;
|
||||
using xo::reflect::TaggedPtr;
|
||||
|
||||
namespace obj {
|
||||
List::List(gp<Object> head, gp<List> rest)
|
||||
: head_{head}, rest_{rest} {}
|
||||
|
|
@ -66,6 +70,11 @@ namespace xo {
|
|||
Object::assign_member(this, &(this->rest_), tail);
|
||||
}
|
||||
|
||||
TaggedPtr
|
||||
List::self_tp() const {
|
||||
return Reflect::make_tp(const_cast<List*>(this));
|
||||
}
|
||||
|
||||
std::size_t
|
||||
List::_shallow_size() const {
|
||||
return sizeof(List);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue