Add C++20 documentation chapter

This commit is contained in:
William S Fulton 2020-06-08 20:52:57 +01:00
commit b7bcb338cf
36 changed files with 1088 additions and 1030 deletions

View file

@ -7,7 +7,7 @@
</head>
<body bgcolor="#ffffff">
<H1><a name="Library">11 SWIG library</a></H1>
<H1><a name="Library">12 SWIG library</a></H1>
<!-- INDEX -->
<div class="sectiontoc">
<ul>
@ -67,7 +67,7 @@ Alternative libraries provide similar functionality. Please read this chapter
carefully if you used the old libraries.
</p>
<H2><a name="Library_nn2">11.1 The %include directive and library search path</a></H2>
<H2><a name="Library_nn2">12.1 The %include directive and library search path</a></H2>
<p>
@ -99,7 +99,7 @@ Set the environment variable to hold an alternative library directory.
The directories that are searched are displayed when using <tt>-verbose</tt> commandline option.
</p>
<H2><a name="Library_nn3">11.2 C arrays and pointers</a></H2>
<H2><a name="Library_nn3">12.2 C arrays and pointers</a></H2>
<p>
@ -111,7 +111,7 @@ pointers as class-like objects. Since these functions provide direct access to
memory, their use is potentially unsafe and you should exercise caution.
</p>
<H3><a name="Library_nn4">11.2.1 cpointer.i</a></H3>
<H3><a name="Library_nn4">12.2.1 cpointer.i</a></H3>
<p>
@ -327,7 +327,7 @@ In this example, the function <tt>int_to_uint()</tt> would be used to cast type
<b>Note:</b> When working with simple pointers, typemaps can often be used to provide more seamless operation.
</p>
<H3><a name="Library_carrays">11.2.2 carrays.i</a></H3>
<H3><a name="Library_carrays">12.2.2 carrays.i</a></H3>
<p>
@ -506,7 +506,7 @@ used with types of <tt>char</tt> or <tt>char *</tt>.
SWIG's default handling of these types is to handle them as character strings and the two macros do not do enough to change this.
</p>
<H3><a name="Library_nn6">11.2.3 cmalloc.i</a></H3>
<H3><a name="Library_nn6">12.2.3 cmalloc.i</a></H3>
<p>
@ -667,7 +667,7 @@ Now, in a script:
</pre>
</div>
<H3><a name="Library_nn7">11.2.4 cdata.i</a></H3>
<H3><a name="Library_nn7">12.2.4 cdata.i</a></H3>
<p>
@ -769,7 +769,7 @@ char *cdata_<em>name</em>(type* ptr, int nitems)
Clearly they are unsafe.
</p>
<H2><a name="Library_nn8">11.3 C string handling</a></H2>
<H2><a name="Library_nn8">12.3 C string handling</a></H2>
<p>
@ -789,7 +789,7 @@ morality. The modules in this section provide basic functionality
for manipulating raw C strings.
</p>
<H3><a name="Library_nn9">11.3.1 Default string handling</a></H3>
<H3><a name="Library_nn9">12.3.1 Default string handling</a></H3>
<p>
@ -830,7 +830,7 @@ interpreter and lead to a crash). Furthermore, the default behavior does
not work well with binary data. Instead, strings are assumed to be NULL-terminated.
</p>
<H3><a name="Library_nn10">11.3.2 Passing binary data</a></H3>
<H3><a name="Library_nn10">12.3.2 Passing binary data</a></H3>
<p>
@ -872,7 +872,7 @@ In the wrapper function, the passed string will be expanded to a pointer and len
The <tt>(char *STRING, int LENGTH)</tt> multi-argument typemap is also available in addition to <tt>(char *STRING, size_t LENGTH)</tt>.
</p>
<H3><a name="Library_nn11">11.3.3 Using %newobject to release memory</a></H3>
<H3><a name="Library_nn11">12.3.3 Using %newobject to release memory</a></H3>
<p>
@ -913,7 +913,7 @@ however, you may need to provide your own "newfree" typemap for other types.
See <a href="Customization.html#Customization_ownership">Object ownership and %newobject</a> for more details.
</p>
<H3><a name="Library_nn12">11.3.4 cstring.i</a></H3>
<H3><a name="Library_nn12">12.3.4 cstring.i</a></H3>
<p>
@ -1373,7 +1373,7 @@ structure or class instead.
</li>
</ul>
<H2><a name="Library_stl_cpp_library">11.4 STL/C++ library</a></H2>
<H2><a name="Library_stl_cpp_library">12.4 STL/C++ library</a></H2>
<p>
@ -1420,7 +1420,7 @@ Please look for the library files in the appropriate language library directory.
</p>
<H3><a name="Library_std_string">11.4.1 std::string</a></H3>
<H3><a name="Library_std_string">12.4.1 std::string</a></H3>
<p>
@ -1504,7 +1504,7 @@ void foo(string s, const String &amp;t); // std_string typemaps still applie
</pre>
</div>
<H3><a name="Library_std_vector">11.4.2 std::vector</a></H3>
<H3><a name="Library_std_vector">12.4.2 std::vector</a></H3>
<p>
@ -1683,7 +1683,7 @@ if you want to make their head explode.
details and the public API exposed to the interpreter vary.
</p>
<H3><a name="Library_stl_exceptions">11.4.3 STL exceptions</a></H3>
<H3><a name="Library_stl_exceptions">12.4.3 STL exceptions</a></H3>
<p>
@ -1733,10 +1733,10 @@ The <tt>%exception</tt> directive can be used by placing the following code befo
Any thrown STL exceptions will then be gracefully handled instead of causing a crash.
</p>
<H3><a name="Library_std_shared_ptr">11.4.4 shared_ptr smart pointer</a></H3>
<H3><a name="Library_std_shared_ptr">12.4.4 shared_ptr smart pointer</a></H3>
<H4><a name="Library_shared_ptr_basics">11.4.4.1 shared_ptr basics</a></H4>
<H4><a name="Library_shared_ptr_basics">12.4.4.1 shared_ptr basics</a></H4>
<p>
@ -1832,7 +1832,7 @@ System.out.println(val1 + " " + val2);
</pre>
</div>
<H4><a name="Library_shared_ptr_inheritance">11.4.4.2 shared_ptr and inheritance</a></H4>
<H4><a name="Library_shared_ptr_inheritance">12.4.4.2 shared_ptr and inheritance</a></H4>
<p>
@ -1923,7 +1923,7 @@ Adding the missing <tt>%shared_ptr</tt> macros will fix this:
</pre>
</div>
<H4><a name="Library_shared_ptr_overloading">11.4.4.3 shared_ptr and method overloading</a></H4>
<H4><a name="Library_shared_ptr_overloading">12.4.4.3 shared_ptr and method overloading</a></H4>
<p>
@ -1945,7 +1945,7 @@ SWIG will choose to wrap just the first method by default.
For the interested reader, SWIG detects that they are equivalent types via the <a href=Typemaps.html#Typemaps_typecheck_pointer>typecheck typemaps</a> in the shared_ptr library.
</p>
<H4><a name="Library_shared_ptr_templates">11.4.4.4 shared_ptr and templates</a></H4>
<H4><a name="Library_shared_ptr_templates">12.4.4.4 shared_ptr and templates</a></H4>
<p>
@ -1987,7 +1987,7 @@ The SWIG code below shows the required ordering:
</pre>
</div>
<H4><a name="Library_shared_ptr_directors">11.4.4.5 shared_ptr and directors</a></H4>
<H4><a name="Library_shared_ptr_directors">12.4.4.5 shared_ptr and directors</a></H4>
<p>
@ -1995,7 +1995,7 @@ The languages that support shared_ptr also have support for using shared_ptr wit
</p>
<H3><a name="Library_std_auto_ptr">11.4.5 auto_ptr smart pointer</a></H3>
<H3><a name="Library_std_auto_ptr">12.4.5 auto_ptr smart pointer</a></H3>
<p>
@ -2044,10 +2044,10 @@ int value = k.getValue();
</pre>
</div>
<H2><a name="Library_nn16">11.5 Utility Libraries</a></H2>
<H2><a name="Library_nn16">12.5 Utility Libraries</a></H2>
<H3><a name="Library_nn17">11.5.1 exception.i</a></H3>
<H3><a name="Library_nn17">12.5.1 exception.i</a></H3>
<p>