Module scpd.Cpp

Types currently missing from core.stdcpp and some additional utilities

Hopefully in the future we can reduce / remove this module. In the meantime, this is the most pragmatic way to do C++ bindings, as code in core.stdcpp needs to care about cross platform, cross compiler, cross C++ versions compatibility, but we have a much smaller target.

The first step in reducing / removing this module would be to import exceptions / runtime binding for OSX to Druntime.

See Also

https

//github.com/dlang-cpp-interop

Functions

NameDescription
callCPPDelegate(cb) Invoke an std::function pointer (note: must be void* due to mangling issues)
make_shared(args)

Classes

NameDescription
exception

Structs

NameDescription
allocator Can't import core.stdcpp.allocator because it transitively imports core.stdcpp.exception In this case we just need to get the name right for vector
CPPDelegate Simple wrapper around std::function
duration Simple bindings to std::chrono
map Fake bindings for std::map
set Fake bindings for std::set
shared_ptr Simple binding to std::shared_ptr
unique_ptr Simple binding to std::unique_ptr
unordered_map Rudimentary bindings for std::unordered_map
vector Simple bindings from std::vector

Aliases

NameTypeDescription
milli scpd.Cpp.ratio!(1,1000) Simple bindings to std::chrono
milliseconds duration!(long,scpd.Cpp.ratio!(1,1000).ratio) Simple bindings to std::chrono
SCPCallback extern(C++) void function() Type of SCP function callback called by a timer