aboutsummaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2019-02-10 17:34:20 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2019-02-10 17:35:34 +0000
commit7bc928da6092ac2615eb2d5e7ec1171abaf1c0c9 (patch)
tree7eef4dcb3c06cea31c2759278d1c4d3094ef635e /Doc
parent21c0d59ae20152eba94154670809559ed480fc30 (diff)
downloadswig-7bc928da6092ac2615eb2d5e7ec1171abaf1c0c9.tar.gz
Document C++11 UCS-2 UCS-4 and C++17 UTF8 character literals support
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Manual/CPlusPlus11.html16
-rw-r--r--Doc/Manual/CPlusPlus17.html16
2 files changed, 31 insertions, 1 deletions
diff --git a/Doc/Manual/CPlusPlus11.html b/Doc/Manual/CPlusPlus11.html
index f9281bd56..bdcd49735 100644
--- a/Doc/Manual/CPlusPlus11.html
+++ b/Doc/Manual/CPlusPlus11.html
@@ -714,6 +714,22 @@ const int SIZE = sizeof...(ClassName&lt;int, int&gt;);
In the above example <tt>SIZE</tt> is of course wrapped as a constant.
</p>
+<H3><a name="CPlusPlus11_new_char_literals">7.2.19 New character literals</a></H3>
+
+<p>
+C++11 adds support for UCS-2 and UCS-4 character literals.
+These character literals are preceded by either 'u' or 'U'.
+</p>
+
+<div class="code"><pre>
+char16_t a = u'a';
+char32_t b = U'b';
+</pre></div>
+
+<p>
+<b>Compatibility note:</b> SWIG-4.0.0 was the first version to support these Universal Coded Character Set (UCS) character literals.
+</p>
+
<H3><a name="CPlusPlus11_new_string_literals">7.2.19 New string literals</a></H3>
diff --git a/Doc/Manual/CPlusPlus17.html b/Doc/Manual/CPlusPlus17.html
index 690173e6e..93d5b0ad2 100644
--- a/Doc/Manual/CPlusPlus17.html
+++ b/Doc/Manual/CPlusPlus17.html
@@ -32,6 +32,10 @@ There isn't much in C++17 that affects SWIG, however, work has only just begun o
C++17 support.
</p>
+<p>
+<b>Compatibility note:</b> SWIG-4.0.0 is the first version to support any C++17 features.
+</p>
+
<H2><a name="CPlusPlus17_core_language_changes">8.2 Core language changes</a></H2>
@@ -67,10 +71,20 @@ namespace A {
</pre>
</div>
+<H3><a name="CPlusPlus17_u8_char_literals">8.2.2 UTF-8 character literals</a></H3>
+
<p>
-<b>Compatibility note:</b> SWIG-4.0.0 was the first version to support nested namespace definitions.
+C++17 added UTF-8 (u8) character literals.
+These are of type char.
+Example:
</p>
+<div class="code">
+<pre>
+char a = u8'a';
+</pre>
+</div>
+
<H2><a name="CPlusPlus17_standard_library_changes">8.3 Standard library changes</a></H2>