November 21, 2018 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). 1. https://github.com/libmir/mir-algorithm/blob/master/source/mir/rcarray.d 2. https://github.com/libmir/mir-algorithm/blob/master/include/mir/rcarray.h 3. http://symmetryinvestments.com/ 4. https://github.com/kaleidicassociates/ 5. https://github.com/libmir/mir-algorithm/tree/master/cpp_example Ilya |
Copyright © 1999-2021 by the D Language Foundation