swig/Doc/Manual
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
..
android-class.png Add Android docs - supporting screenshots 2011-12-10 17:03:50 +00:00
android-simple.png Add Android docs - supporting screenshots 2011-12-10 17:03:50 +00:00
Android.html Add C++20 documentation chapter 2020-06-08 20:56:40 +01:00
Arguments.html Add C++20 documentation chapter 2020-06-08 20:56:40 +01:00
CCache.html Add C++20 documentation chapter 2020-06-08 20:56:40 +01:00
ch2.1.png The great merge 2002-11-30 22:01:28 +00:00
chapters Add C++20 documentation chapter 2020-06-08 20:56:40 +01:00
Contents.html Movable and move-only types supported in "out" typemaps. 2022-06-30 17:26:48 +01:00
Contract.html Add C++20 documentation chapter 2020-06-08 20:56:40 +01:00
CPlusPlus11.html Movable and move-only types supported in "out" typemaps. 2022-06-30 17:26:48 +01:00
CPlusPlus14.html Documentation section numbering update 2019-02-11 19:02:03 +00:00
CPlusPlus17.html Add support for C++17 hexadecimal floating literals 2019-02-13 15:16:40 -07:00
CPlusPlus20.html Add C++20 documentation chapter 2020-06-08 20:56:40 +01:00
CSharp.html Add special variable imfuncname expansion for C# and D 2022-05-30 19:43:04 +01:00
Customization.html Add C++20 documentation chapter 2020-06-08 20:56:40 +01:00
D.html Add special variable imfuncname expansion for C# and D 2022-05-30 19:43:04 +01:00
Doxygen.html Fix typos in docs and comments 2022-02-27 18:15:46 +13:00
Extending.html Improvements to the -debug command line options 2022-03-25 23:34:52 +00:00
fixstyle.py HTML pdf doc generation fixes 2015-12-30 22:22:33 +00:00
Go.html [Go] Make -intgosize optional 2022-03-16 18:30:05 +13:00
Guile.html Stop suggesting %name in Guile.html 2022-03-07 10:31:52 +13:00
index.html Update version number to 4.0 in docs 2017-09-14 07:39:16 +01:00
Introduction.html Add C++20 documentation chapter 2020-06-08 20:56:40 +01:00
Java.html Merge branch 'imfunc' 2022-05-30 19:45:28 +01:00
Javascript.html [js] Update docs re v8 support 2021-12-02 14:01:27 +13:00
Library.html Document argc argv library 2022-05-15 19:12:39 +01:00
linkchecker.config html links updates 2015-12-18 21:14:44 +00:00
Lisp.html Disable Allegrcol target language 2019-02-05 18:42:16 +00:00
Lua.html Fix typos in docs and comments 2022-02-27 18:15:46 +13:00
makechap.py Update python manual scripts to py3 compatibility (#2204) 2022-03-18 13:29:22 +13:00
Makefile Add linkchecker3 make target to check internal links 2019-04-15 19:31:32 +01:00
maketoc.py Update python manual scripts to py3 compatibility (#2204) 2022-03-18 13:29:22 +13:00
Modules.html Fix module example so generated code compiles 2022-03-18 19:26:16 +13:00
Mzscheme.html Add C++20 documentation chapter 2020-06-08 20:56:40 +01:00
Ocaml.html [ocaml] Improve the Qt example 2022-02-01 11:46:39 +13:00
Octave.html Fix missing HTML escaping in Octave docs 2022-01-18 13:56:07 +13:00
Perl5.html Remove confusing extra parameter from doc example 2022-03-09 15:05:44 +13:00
Php.html Fix typos 2022-02-10 16:12:24 +13:00
Preface.html Few more PCRE to PCRE2 changes 2022-01-21 18:35:20 +00:00
Preprocessor.html Remove -py3 command line option 2022-03-23 18:13:07 +00:00
Python.html Doxygen comments take precedence over the autodoc feature. 2022-04-06 08:08:14 +01:00
R.html Fix typos 2021-11-17 07:07:02 +02:00
README subject/verb agreement 2013-04-30 22:49:12 -03:00
Ruby.html Add C++20 documentation chapter 2020-06-08 20:56:40 +01:00
Scilab.html [Scilab] remove targetversion argument 2022-02-21 10:01:59 +01:00
Scripting.html Fix some typos in docs and examples and make the code look nicer. 2016-12-31 23:06:56 +08:00
Sections.html Add C++20 documentation chapter 2020-06-08 20:56:40 +01:00
style.css Reformat tag lists in doxygen documentation 2019-09-15 10:57:58 -05:00
SWIG.html Improvements to the -debug command line options 2022-03-25 23:34:52 +00:00
swig16.png remove svn:executable property where applied incorrectly 2008-11-26 21:54:49 +00:00
SWIGPlus.html Movable and move-only types supported in "out" typemaps. 2022-06-30 17:26:48 +01:00
Tcl.html Remove confusing extra parameter from doc example 2022-03-09 15:05:44 +13:00
Typemaps.html Movable and move-only types supported in "out" typemaps. 2022-06-30 17:26:48 +01:00
Varargs.html Remove some usage of strdup 2022-05-07 07:09:44 +01:00
Warnings.html Using declarations in inheritance hierarchy improvements. 2022-02-26 12:46:06 +00:00
Windows.html Update CMake build to use NuGet Bison3 2022-01-29 09:19:04 +13:00

This directory contains the HTML for the SWIG users manual.

All of this HTML is hand-written.  However, section numbering, indices,
and the table of contents are generated automatically by the 'maketoc.py'
script. The Makefile has further information on how the various alternative
forms of the documentation are generated from the hand-written HTML.

There are 4 types of boxes that code or whatever can be inside:
  - <div class="shell">...</div>
    This is for text that shows the output of running commands on the shell.
  - <div class="code">...</div>
    This is for either C, C++, or SWIG code
  - <div class="targetlang">...</div>
    This is for code in a target scripting language
  - <div class="diagram">...</div>
    This is for text that is not code or a shell

The general format is
<div class="foo"><pre>
whatever here
</pre></div>