xo-object2: GCObjectConversion for double (via DFloat)

This commit is contained in:
Roland Conybeare 2026-01-25 10:13:22 -05:00
commit 6605b459f3
4 changed files with 76 additions and 3 deletions

View file

@ -0,0 +1,29 @@
/** @file GCObjectConversion_DFloat.hpp
*
* @author Roland Conybeare, Jan 2026
**/
#pragma once
#include "DFloat.hpp"
#include "number/IGCObject_DFloat.hpp"
#include <xo/gc/GCObjectConversion.hpp>
namespace xo {
namespace scm {
template <>
struct GCObjectConversion<double> {
static_assert(std::is_same_v<double, DFloat::value_type>);
using AGCObject = xo::mm::AGCObject;
using AAllocator = xo::mm::AAllocator;
static obj<AGCObject> to_gco(obj<AAllocator> mm, const double & x);
static double from_gco(obj<AAllocator> mm, obj<AGCObject> gco);
};
} /*namespace scm*/
} /*namespace xo*/
/* end GCObjectConversion_DFloat.hpp */