swig/Examples/test-suite/d
William S Fulton bf36bf7d8a Movable and move-only types supported in "out" typemaps.
Enhance SWIGTYPE "out" typemaps to use std::move when copying
objects, thereby making use of move semantics when wrapping a function returning
by value if the returned type supports move semantics.

Wrapping functions that return move only types 'by value' now work out the box
without having to provide custom typemaps.

The implementation removed all casts in the "out" typemaps to allow the compiler to
appropriately choose calling a move constructor, where possible, otherwise a copy
constructor. The implementation alsoand required modifying SwigValueWrapper to
change a cast operator from:

  SwigValueWrapper::operator T&() const;

to

  #if __cplusplus >=201103L
    SwigValueWrapper::operator T&&() const;
  #else
    SwigValueWrapper::operator T&() const;
  #endif

This is not backwards compatible for C++11 and later when using the valuewrapper feature
if a cast is explicitly being made in user supplied "out" typemaps. Suggested change
in custom "out" typemaps for C++11 and later code:

1. Try remove the cast altogether to let the compiler use an appropriate implicit cast.
2. Change the cast, for example, from static_cast<X &> to static_cast<X &&>, using the
   __cplusplus macro if all versions of C++ need to be supported.

Issue #999
Closes #1044

More about the commit:
Added some missing "varout" typemaps for Ocaml which was falling back to
use "out" typemaps as they were missing.

Ruby std::set fix for SwigValueWrapper C++11 changes.
2022-06-30 17:26:48 +01:00
..
Makefile.in Consistent cpp11 testing in test-suite 2022-03-27 19:34:20 +01:00
README Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
aggregate_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
aggregate_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
allprotected_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
allprotected_runme.2.d [D] Improved allprotected test case error messages. 2011-12-03 19:47:12 +00:00
apply_strings_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
apply_strings_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
bools_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
bools_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
catches_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
catches_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
char_strings_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
char_strings_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
constover_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
constover_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
d_nativepointers_runme.1.d [D] Correctly annotate function pointers with C linkage. 2012-01-23 21:59:00 +00:00
d_nativepointers_runme.2.d [D] Correctly annotate function pointers with C linkage. 2012-01-23 21:59:00 +00:00
default_args_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
default_args_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
default_constructor_runme.1.d Don't generate constructor wrappers if a base class has a private constructor 2015-07-07 20:15:55 +01:00
default_constructor_runme.2.d Don't generate constructor wrappers if a base class has a private constructor 2015-07-07 20:15:55 +01:00
director_alternating_runme.1.d Move a couple of runme files which into the correct directories 2011-01-17 21:25:04 +00:00
director_alternating_runme.2.d [D] Fixed a bug in the loop breaking code for directors leading to a superclass implementation erroneously being called. 2011-01-08 21:05:49 +00:00
director_basic_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
director_basic_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
director_classes_runme.1.d Add director typemaps for pointer const ref types 2017-10-24 23:47:40 +01:00
director_classes_runme.2.d Add director typemaps for pointer const ref types 2017-10-24 23:47:40 +01:00
director_classic_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
director_classic_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
director_ignore_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
director_ignore_runme.2.d [D] Test case fix: Aliases now required for non-overridden base class overloads. 2011-12-03 19:47:26 +00:00
director_primitives_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
director_primitives_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
director_protected_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
director_protected_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
director_string_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
director_string_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
enum_thorough_runme.1.d [D] Ported r12557 (char enum values). 2011-04-10 16:10:42 +00:00
enum_thorough_runme.2.d [D] Ported r12557 (char enum values). 2011-04-10 16:10:42 +00:00
inherit_target_language_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
inherit_target_language_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
li_attribute_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
li_attribute_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
li_boost_shared_ptr_bits_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
li_boost_shared_ptr_bits_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
li_boost_shared_ptr_director_runme.2.d Add director shared_ptr typemaps for D 2017-10-17 22:47:16 +01:00
li_boost_shared_ptr_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
li_boost_shared_ptr_runme.2.d D: Use deterministic allocation on the D side in li_boost_shared_ptr_runme.i. 2014-11-06 23:04:35 +01:00
li_std_except_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
li_std_except_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
li_std_string_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
li_std_string_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
li_std_vector_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
li_std_vector_runme.2.d Fix typos 2021-11-17 07:07:02 +02:00
li_typemaps_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
li_typemaps_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
long_long_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
long_long_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
member_pointer_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
member_pointer_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
nspace_extend_runme.1.d [D] nspace support. 2011-03-13 00:32:26 +00:00
nspace_extend_runme.2.d [D] nspace support. 2011-03-13 00:32:26 +00:00
nspace_runme.1.d [D] nspace support. 2011-03-13 00:32:26 +00:00
nspace_runme.2.d [D] nspace support. 2011-03-13 00:32:26 +00:00
operator_overload_runme.1.d [D] Operator overloading support for D1 and D2. 2010-12-30 02:44:04 +00:00
operator_overload_runme.2.d Fix typos 2014-04-29 11:31:29 +12:00
overload_complicated_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
overload_complicated_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
overload_template_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
overload_template_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
pointer_reference_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
pointer_reference_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
preproc_constants_c_runme.1.d Parse common cases of `<` and `>` comparisons 2022-01-25 14:09:41 +13:00
preproc_constants_c_runme.2.d Parse common cases of `<` and `>` comparisons 2022-01-25 14:09:41 +13:00
preproc_constants_runme.1.d Parse common cases of `<` and `>` comparisons 2022-01-25 14:09:41 +13:00
preproc_constants_runme.2.d Parse common cases of `<` and `>` comparisons 2022-01-25 14:09:41 +13:00
proxycode_runme.2.d Add %proxycode directive for adding code into proxy classes for C#, D and Java 2017-01-13 20:43:50 +00:00
sizet_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
sizet_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
sneaky1_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
sneaky1_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
special_variable_macros_runme.1.d Document patch #33 from previous commit and complete run time tests 2013-04-18 23:20:48 +01:00
special_variable_macros_runme.2.d Document patch #33 from previous commit and complete run time tests 2013-04-18 23:20:48 +01:00
threads_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
threads_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
throw_exception_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
throw_exception_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
typemap_namespace_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
typemap_namespace_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
typemap_out_optimal_runme.1.d Movable and move-only types supported in "out" typemaps. 2022-06-30 17:26:48 +01:00
typemap_out_optimal_runme.2.d Movable and move-only types supported in "out" typemaps. 2022-06-30 17:26:48 +01:00
varargs_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
varargs_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
virtual_poly_runme.1.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
virtual_poly_runme.2.d Added support for the D programming languge. 2010-11-18 00:24:02 +00:00

README

D language module testsuite
---------------------------

Please see ../README for the common readme file.

By default the D1 version is built, set D_VERSION=2 (in the environment or at
the make command line) to run it for D2 instead.