aboutsummaryrefslogtreecommitdiff
path: root/Doc/Manual/CPlusPlus20.html
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/Manual/CPlusPlus20.html')
-rw-r--r--Doc/Manual/CPlusPlus20.html91
1 files changed, 91 insertions, 0 deletions
diff --git a/Doc/Manual/CPlusPlus20.html b/Doc/Manual/CPlusPlus20.html
new file mode 100644
index 000000000..98cb28661
--- /dev/null
+++ b/Doc/Manual/CPlusPlus20.html
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<title>SWIG and C++20</title>
+<link rel="stylesheet" type="text/css" href="style.css">
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+</head>
+
+<body bgcolor="#ffffff">
+<H1><a name="CPlusPlus20">10 SWIG and C++20</a></H1>
+<!-- INDEX -->
+<div class="sectiontoc">
+<ul>
+<li><a href="#CPlusPlus20_introduction">Introduction</a>
+<li><a href="#CPlusPlus20_core_language_changes">Core language changes</a>
+<ul>
+<li><a href="#CPlusPlus20_spaceship_operator">Spaceship operator</a>
+<li><a href="#CPlusPlus20_lambda_templates">Lambda templates</a>
+<li><a href="#CPlusPlus20_constexpr_destructors">Constexpr destructors</a>
+</ul>
+<li><a href="#CPlusPlus20_standard_library_changes">Standard library changes</a>
+</ul>
+</div>
+<!-- INDEX -->
+
+
+
+<H2><a name="CPlusPlus20_introduction">10.1 Introduction</a></H2>
+
+
+<p>This chapter gives you a brief overview about the SWIG
+implementation of the C++20 standard.
+Work has only just begun on adding C++20 support.
+</p>
+
+<p>
+<b>Compatibility note:</b> SWIG-4.1.0 is the first version to support any C++20 features.
+</p>
+
+<H2><a name="CPlusPlus20_core_language_changes">10.2 Core language changes</a></H2>
+
+
+<H3><a name="CPlusPlus20_spaceship_operator">10.2.1 Spaceship operator</a></H3>
+
+
+<p>
+SWIG supports the spaceship operator <tt>&lt;=&gt;</tt> in constant
+expressions. To simplify handling of the return value type, it is currently
+treated as an integer rather than <tt>std::strong_ordering</tt>, etc.
+In practice we think that should do the right thing in most cases.
+</p>
+
+<p>
+SWIG also recognises <tt>operator&lt;=&gt;</tt> which can be wrapped
+if renamed. There is not currently any default renaming for the operator
+or any attempt to automatically map it to a three-way comparison operator
+in any of the target languages.
+</p>
+
+<H3><a name="CPlusPlus20_lambda_templates">10.2.2 Lambda templates</a></H3>
+
+
+<p>
+SWIG should parse lambda templates, but like
+<a href="CPlusPlus11.html#CPlusPlus11_lambda_functions_and_expressions">
+non-templated lambdas</a> they aren't currently wrapped.
+</p>
+
+
+<H3><a name="CPlusPlus20_constexpr_destructors">10.2.3 Constexpr destructors</a></H3>
+
+
+<p>
+Destructors that are declared <tt>constexpr</tt> are parsed and handled like any other constructor.
+For example:
+</p>
+
+<div class="code">
+<pre>
+class DtorA {
+public:
+ constexpr ~DtorA() {}
+};
+</pre>
+</div>
+
+<H2><a name="CPlusPlus20_standard_library_changes">10.3 Standard library changes</a></H2>
+
+
+</body>
+</html>