www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - RCArray for D & C++ - mir-algorithm v3.1.12

Thread safe reference counted RCArray with DIP1000 in mind has 
been released with mir-algorithm v3.1.12.

It has well defined C++ header. You can use it from C++ if the 
same type is used in linked D object file.

D's RCArray (1) (mir_rcarray) does not have range primitives, 
only length, [], and [i] primitives. [] returns a common scoped 
slice view (common D array).

C++'s mir_rcarray (2) defines [i], at, begin, cbegin, end, cend, 
and data primitives.

Both D and C++ versions define asSlice method that returns 
ndslice view on top of reference counted iterator.

See also the example D&C++ interaction (5)

D&C++ interaction now tested in Travis CI. GCC may not be 
compatible with LDC, CLANG interacts well.

This work has been sponsored by Symmetry Investments (3) and 
Kaleidic Associates (4).

3. http://symmetryinvestments.com/
4. https://github.com/kaleidicassociates/
5. https://github.com/libmir/mir-algorithm/tree/master/cpp_example

Nov 20 2018