diff options
Diffstat (limited to 'xsde/cxx/hybrid/tree-forward.cxx')
-rw-r--r-- | xsde/cxx/hybrid/tree-forward.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/xsde/cxx/hybrid/tree-forward.cxx b/xsde/cxx/hybrid/tree-forward.cxx index 24d7b21..dbfdd7e 100644 --- a/xsde/cxx/hybrid/tree-forward.cxx +++ b/xsde/cxx/hybrid/tree-forward.cxx @@ -628,6 +628,20 @@ namespace CXX pre (ns); names (ns); + // Custom allocator. + // + if (custom_alloc) + { + os << endl + << "// Custom allocator." << endl + << "//" << endl + << "using ::xsde::cxx::alloc;" + << "using ::xsde::cxx::free;"; + + if (exceptions) + os << "using ::xsde::cxx::alloc_guard;"; + } + // strdupx // if (!stl) @@ -718,6 +732,10 @@ namespace CXX } else { + if (ctx.custom_alloc) + ctx.os << "#include <xsde/cxx/allocator.hxx>" << endl + << endl; + if (ctx.stl) ctx.os << "#include <string>" << endl; else |