Commit graph

14 commits

Author SHA1 Message Date
William S Fulton
41fddf61ec Add Lua support for std::unique_ptr and std::auto_ptr
Equivalent to Python/Ruby implementations.
2022-08-11 21:38:21 +01:00
William S Fulton
fa9c7a7197 Add PHP support for std::unique_ptr and std::auto_ptr
Equivalent to Python/Ruby implementations.
2022-08-06 18:34:26 +01:00
William S Fulton
910fd1e3cf [D] Fix occasional undefined behaviour with inheritance hierarchies
Particularly when using virtual inheritance as the pointers weren't
correctly upcast from derived class to base class when stored in the
base's proxy class.

Fixes commented out test code in cpp11_std_unique_ptr_runme
and li_std_auto_ptr_runme D tests.
2022-08-05 22:30:23 +01:00
William S Fulton
5a379d317b Add Tcl support for std::unique_ptr and std::auto_ptr
Equivalent to C#/Java implementations.
2022-08-05 22:30:23 +01:00
William S Fulton
fe17296eb4 Add Javascript support for std::unique_ptr and std::auto_ptr
Equivalent to Ruby/Python implementations.
2022-08-04 07:14:30 +01:00
William S Fulton
2ccc9bd060 Add Octave support for std::unique_ptr and std::auto_ptr
Equivalent to Ruby/Python implementations.
2022-08-02 00:00:54 +01:00
William S Fulton
26fbf99901 Add Tcl support for std::unique_ptr and std::auto_ptr
Equivalent to Ruby/Python implementations.
2022-07-30 16:43:05 +01:00
William S Fulton
f99a2e6f64 Add Ruby support for std::unique_ptr inputs
Equivalent to Java/C#/Python implementations.
2022-07-17 15:20:25 +01:00
William S Fulton
c3c061cac8 Add Python support for std::unique_ptr inputs
Equivalent to Java/C# implementation.
2022-07-17 15:20:20 +01:00
William S Fulton
c737bd5713 Add C# support std::unique_ptr inputs
Based on Java implementation.
2022-07-17 15:20:13 +01:00
William S Fulton
8bd9eb3f16 Java unique_ptr test ownership enhancement to test
Make sure the object is owned before releasing ownership
and passing ownership to unique_ptr instance.
2022-07-17 15:15:24 +01:00
William S Fulton
6b361bf050 Add Java support for std::unique<T> for input parameters.
This works by transferring ownership of the underlying C++ memory
from the target language proxy class to an instance of the unique_ptr
which is passed to the wrapped function via std::move.

The proxy class has a new swigRelease() method which sets the
underlying C++ pointer for the proxy class to null, so working
in much the same way as std::unique_ptr::release(). Any attempt at
using the proxy class will be the same as if the delete() function
has been called on the proxy class. That is, using a C++ null pointer,
when a non-null pointer is usually expected.

This commit relies on the previous commit that uses std::move
on the temporary variable used for the wrapped function's input parameter
as std::unique_ptr is not copyable, it has move-only semantics.
2022-07-17 15:15:24 +01:00
Erez Geva
adb85d3d05 Add std::unique_ptr<type> to Perl5.
Signed-off-by: Erez Geva <ErezGeva2@gmail.com>
2022-07-09 13:52:43 +02:00
William S Fulton
299880e6a6 Add std::unique support
Simple copy of current auto_ptr support (just suppport for
functions returning std::unique_ptr).

Closes #1722
2022-07-02 16:17:18 +01:00