Commit graph

4 commits

Author SHA1 Message Date
William S Fulton
93eb7eae0b Limited Python/Ruby support for boost::array
Hack to use the std::array support for boost::array.
Is limited as it currently exposes some 'using' bugs in SWIG.
For example, the type system fails to see that pointers to std::array
and pointers to boost::array are the same.

This approach saves having to maintain separate boost::array support.
The 'using' bug ought to be fixed, otherwise separate boost_array.i
files could be easily made from the std_array.i files.
2015-11-27 19:30:22 +00:00
William S Fulton
bb2523a003 Ruby STL container setting slices fixes
Setting an STL container wrapper slice better matches the way Ruby
arrays work. The behaviour is now the same as Ruby arrays. The only
exception is the default value used when expanding a container
cannot be nil as this is not a valid type/value for C++ container
elements.
2015-11-25 10:13:30 +00:00
William S Fulton
cd33aba427 Ruby STL container ranges and slices fixes.
Access via ranges and slices now behave identically to Ruby arrays.
The fixes are mostly for out of range indices and lengths.
- Zero length slice requests return an empty container instead of nil.
- Slices which request a length greater than the size of the container
  no longer chop off the last element.
- Ranges which used to return nil now return an empty array when the
  the start element is a valid index.
2015-11-25 09:19:13 +00:00
William S Fulton
b8feb85f0e Add Ruby std_array.i - std::array wrappers 2015-11-25 09:19:05 +00:00