xo-object2: utest: ++ allocation in collector utest
This commit is contained in:
parent
6bd33bd900
commit
3f1470f938
18 changed files with 196 additions and 26 deletions
24
xo-object2/src/object2/DFloat.cpp
Normal file
24
xo-object2/src/object2/DFloat.cpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/** @file DFloat.cpp
|
||||
*
|
||||
* @author Roland Conybeare, Dec 2025
|
||||
**/
|
||||
|
||||
#include "DFloat.hpp"
|
||||
|
||||
namespace xo {
|
||||
using xo::facet::typeseq;
|
||||
|
||||
namespace scm {
|
||||
DFloat *
|
||||
DFloat::make(obj<AAllocator> mm,
|
||||
double x)
|
||||
{
|
||||
void * mem = mm.alloc(typeseq::id<DFloat>(),
|
||||
sizeof(DFloat));
|
||||
|
||||
return new (mem) DFloat(x);
|
||||
}
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end DFloat.cpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue