xo-arena xo-facet xo-alloc2: build restored

This commit is contained in:
Roland Conybeare 2026-01-06 00:01:38 -05:00
commit 154eca1086
19 changed files with 48 additions and 25 deletions

View file

@ -2,6 +2,7 @@
include(CMakeFindDependencyMacro)
#find_dependency(indentlog)
find_depnedency(xo_arena)
find_dependency(xo_facet)
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
check_required_components("@PROJECT_NAME@")

View file

@ -23,7 +23,7 @@ namespace xo {
**/
struct AAllocIterator {
using obj_AAllocIterator = xo::facet::obj<AAllocIterator>;
using typeseq = xo::facet::typeseq;
using typeseq = xo::reflect::typeseq;
/** @defgroup mm-allociterator-methods AllocIterator methods **/
///@{

View file

@ -5,7 +5,7 @@
#pragma once
#include "AllocError.hpp"
#include <xo/arena/AllocError.hpp>
#include "AllocInfo.hpp"
//#include "AllocIterator.hpp"
#include "AllocRange.hpp"

View file

@ -20,7 +20,7 @@ namespace xo {
* @brief AllocIterator implementation for empty variant instance
**/
struct IAllocIterator_Any : public AAllocIterator {
using typeseq = xo::facet::typeseq;
using typeseq = xo::reflect::typeseq;
const AAllocIterator * iface() const { return std::launder(this); }

View file

@ -18,7 +18,7 @@ namespace xo {
typename IAllocIterator_DRepr>
struct IAllocIterator_Xfer : public AAllocIterator {
using Impl = IAllocIterator_DRepr;
using typeseq = xo::facet::typeseq;
using typeseq = xo::reflect::typeseq;
static const DRepr & _dcast(Copaque d) { return *(const DRepr *)d; }
static DRepr & _dcast(Opaque d) { return *(DRepr *)d; }
@ -48,9 +48,9 @@ namespace xo {
};
template <typename DRepr, typename IAllocIterator_DRepr>
xo::facet::typeseq
xo::reflect::typeseq
IAllocIterator_Xfer<DRepr, IAllocIterator_DRepr>::s_typeseq
= facet::typeseq::id<DRepr>();
= reflect::typeseq::id<DRepr>();
template <typename DRepr, typename IAllocIterator_DRepr>
bool

View file

@ -17,7 +17,7 @@ namespace xo {
public:
using ObjectType = Object;
using DataPtr = Object::DataPtr;
using typeseq = xo::facet::typeseq;
using typeseq = xo::reflect::typeseq;
RAllocIterator() {}
RAllocIterator(Object::DataPtr data) : Object{std::move(data)} {}

View file

@ -3,7 +3,7 @@
set(SELF_LIB xo_alloc2)
set(SELF_SRCS
AllocError.cpp
# AllocError.cpp
AllocInfo.cpp
cmpresult.cpp
@ -21,5 +21,6 @@ set(SELF_SRCS
xo_add_shared_library4(${SELF_LIB} ${PROJECT_NAME}Targets ${PROJECT_VERSION} 1 ${SELF_SRCS})
# note: deps here must also appear in cmake/xo_alloc2Config.cmake.in
xo_dependency(${SELF_LIB} xo_arena)
xo_dependency(${SELF_LIB} xo_facet)
xo_dependency(${SELF_LIB} indentlog)

View file

@ -9,8 +9,8 @@
namespace xo {
namespace mm {
using xo::facet::DVariantPlaceholder;
using xo::facet::typeseq;
using xo::facet::valid_facet_implementation;
using xo::reflect::typeseq;
void
IAllocIterator_Any::_fatal() {

View file

@ -20,22 +20,12 @@ add_definitions(${PROJECT_CXX_FLAGS})
# ----------------------------------------------------------------
# output targets
add_subdirectory(src/arena)
#add_subdirectory(utest)
# ----------------------------------------------------------------
# header-only library
# cmake export
set(SELF_LIB xo_arena)
xo_add_headeronly_library(${SELF_LIB})
xo_install_library4(${SELF_LIB} ${PROJECT_NAME}Targets)
xo_export_cmake_config(${PROJECT_NAME} ${PROJECT_VERSION} ${PROJECT_NAME}Targets)
# ----------------------------------------------------------------
# input dependencies
#
# NOTE: dependency set here must be kept consistent with
# xo-arena/cmake/xo_arenaConfig.cmake.in
#xo_headeronly_dependency(${SELF_LIB} xo_flatstring)
# end CMakeLists.txt

View file

@ -1 +0,0 @@
# xo-arena

View file

@ -6,7 +6,7 @@ include(CMakeFindDependencyMacro)
# must coordinate with xo_dependency() calls
# in CMakeLists.txt
#
#find_dependency(xo_flatstring)
find_dependency(xo_reflectutil)
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
check_required_components("@PROJECT_NAME@")

View file

@ -0,0 +1,19 @@
# xo-arena/src/CMakeLists.txt
set(SELF_LIB xo_arena)
set(SELF_SRCS
AllocError.cpp
)
xo_add_shared_library4(${SELF_LIB} ${PROJECT_NAME}Targets ${PROJECT_VERSION} 1 ${SELF_SRCS})
xo_install_include_tree3(include/xo/arena)
# ----------------------------------------------------------------
# input dependencies
#
# NOTE: dependency set here must be kept consistent with
# xo-arena/cmake/xo_arenaConfig.cmake.in
xo_dependency(${SELF_LIB} xo_reflectutil)
# end src/CMakeLists.txt

View file

@ -6,7 +6,7 @@
#pragma once
#include "facet_implementation.hpp"
#include "typeseq.hpp"
#include <xo/reflectutil/typeseq.hpp>
#include <new>
#include <cstring>
#include <cstddef>
@ -64,6 +64,7 @@ namespace xo {
using DataType = DRepr;
using DataPtr = DRepr*;
using Opaque = void *;
using typeseq = xo::reflect::typeseq;
/* required for vtable swapping to work */
//static_assert(std::is_trivially_copyable_v<AFacet>);

View file

@ -8,6 +8,7 @@ set(UTEST_SRCS
if (ENABLE_TESTING)
xo_add_utest_executable(${UTEST_EXE} ${UTEST_SRCS})
xo_self_dependency(${UTEST_EXE} xo_arena)
xo_external_target_dependency(${UTEST_EXE} Catch2 Catch2::Catch2)
endif()

View file

@ -8,6 +8,7 @@
#include <xo/gc/GCObject.hpp>
//#include "xo/alloc2/gcobject/RGCObject.hpp"
#include <xo/facet/obj.hpp>
#include <xo/indentlog/print/ppindentinfo.hpp>
namespace xo {
namespace scm {
@ -16,6 +17,7 @@ namespace xo {
using size_type = std::size_t;
using AGCObject = xo::mm::AGCObject;
using AAllocator = xo::mm::AAllocator;
using ppindentinfo = xo::print::ppindentinfo;
DList(xo::obj<AGCObject> h,
DList * r) : head_{h}, rest_{r} {}
@ -40,8 +42,10 @@ namespace xo {
/** return element at 0-based index @p ix **/
obj<AGCObject> at(size_type ix) const;
#ifdef NOT_YET
/** pretty-printing driver; combine layout+printing **/
bool pretty(const ppindentinfo & ppii) const;
#endif
/** first member of list **/
obj<AGCObject> head_;

View file

@ -18,11 +18,17 @@ namespace xo {
auto
IPrintable_DList::pretty(const DList & self, const ppindentinfo & ppii) -> bool
{
(void)self;
(void)ppii;
return false;
#ifdef NOT_YET
return self.pretty(ppii);
#endif
}
} /*namespace scm*/
} /*namespace xo*/
/* end IPrintable_DList.cpp */
/* end IPrintable_DList.cpp */

View file

@ -20,6 +20,7 @@ if (ENABLE_TESTING)
xo_headeronly_dependency(${SELF_EXE} xo_reflectutil)
xo_dependency(${SELF_EXE} randomgen)
xo_dependency(${SELF_EXE} indentlog)
xo_dependency(${SELF_EXE} xo_flatstring)
xo_external_target_dependency(${SELF_EXE} Catch2 Catch2::Catch2)
endif()