aboutsummaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Devel/cpp11.html (renamed from Doc/Devel/cpp0x.html)126
-rw-r--r--Doc/Manual/CPlusPlus11.html (renamed from Doc/Manual/Cpp0x.html)158
-rw-r--r--Doc/Manual/chapters2
3 files changed, 143 insertions, 143 deletions
diff --git a/Doc/Devel/cpp0x.html b/Doc/Devel/cpp11.html
index 4afc5ffe4..fc35465ae 100644
--- a/Doc/Devel/cpp0x.html
+++ b/Doc/Devel/cpp11.html
@@ -24,15 +24,15 @@
</STYLE>
</HEAD>
<BODY LANG="en-US" DIR="LTR">
-<H1 CLASS="western"><U>C++0x support for SWIG</U></H1>
+<H1 CLASS="western"><U>C++0x/C++11 support for SWIG</U></H1>
<H1 CLASS="western">Summary</H1>
-<P>This is a technical overview of the C++0x support for the Swig.
-This area of Swig is a work in progress. Initial C++0x support for
+<P>This is a technical overview of the C++0x/C++11 support for the Swig.
+This area of Swig is a work in progress. Initial C++0x/C++11 support for
Swig was written during the Google Summer of Code 2009 period by
Matevž Jekovec.</P>
<H1 CLASS="western">SVN branch</H1>
<P>branches/gsoc2009-matevz</P>
-<H1 CLASS="western">New C++0x features status</H1>
+<H1 CLASS="western">New C++11 features status</H1>
<P>Wikipedia article: <A HREF="http://en.wikipedia.org/wiki/C++0x">http://en.wikipedia.org/wiki/C%2B%2B0x</A>
</P>
<H2>Rvalue reference and move semantics [done]</H2>
@@ -63,12 +63,12 @@ operator=(ClassType&amp;&amp;):</P>
In practice, the Rvalues are used for temporaries (when passing the
result of one function as an argument to another).</P>
<P>Done: Added type&amp;&amp; to Swig parser. Added testcase
-cpp0x_rvalue_reference.i. Operator &amp;&amp; is treated the same as
+cpp11_rvalue_reference.i. Operator &amp;&amp; is treated the same as
operator &amp;. R11450</P>
<P STYLE="margin-bottom: 0cm">Article:
<A HREF="http://www.artima.com/cppsource/rvalue.html">http://www.artima.com/cppsource/rvalue.html</A></P>
<H2>Generalized constant expressions [done]</H2>
-<P>In C++0x you can define functions as constant expressions.
+<P>In C++11 you can define functions as constant expressions.
Functions need to return constant value in form &quot;return expr&quot;,
where expr is a constant expression.
</P>
@@ -84,7 +84,7 @@ so swig doesn't need to know about the constant values when parsing
the header file.
</P>
<P>Done: Added the “constexpr “ keyword to Swig. Added testcase
-cpp0x_constexpr. R11322</P>
+cpp11_constexpr. R11322</P>
<P>Problem: No compilers were known to support constexpr yet, so the
testcase was temporarily commented out in common.mk.
</P>
@@ -94,7 +94,7 @@ template in the translation unit at that time. It's a feature
specifically aimed at compilers to speed up the compilation process.
</P>
<P>Done: Added support for 'extern template class
-std::vector&lt;MyClass&gt;;'. Added testcase cpp0x_template_explicit.
+std::vector&lt;MyClass&gt;;'. Added testcase cpp11_template_explicit.
R11385 , R11386</P>
<H2>Initializer lists [done]</H2>
<P>Initializer list is a new type in standard library:
@@ -117,11 +117,11 @@ is a simple way to convert an ordinary list or a vector to the
initializer_list.</P>
<P>Done: Ignored the constructor having initializer_list as its
argument. Show warning to the user. Added testcase
-cpp0x_initializer_list. R11450</P>
+cpp11_initializer_list. R11450</P>
<P>Article:
<A HREF="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1919.pdf">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1919.pdf</A></P>
<H2>Uniform initialization [done]</H2>
-<P>The new C++0x standard will allow the following:</P>
+<P>The new C++11 standard will allow the following:</P>
<PRE>struct IdString {
std::string name;
int identifier;
@@ -132,7 +132,7 @@ IdString GetString() {
}</PRE><P>
The feature works exactly as it did now for POD types only (eg. int
a[] = {1,2,3};). The following declarations are the same in the new
-C++0x:</P>
+C++11:</P>
<PRE>IdString str1 = {„SomeName“, 4};
IdString str2{„SomeName“, 4};</PRE><P>
The new way of using uniform initialization allows the following:</P>
@@ -154,12 +154,12 @@ AltStruct var2{2, 4.3}; // calls the constructor</PRE><P>
The new syntax is specific to C++. Java, C# and scripting languages
do not support this behaviour, but always need constructors. They
support {} brackets for declaration of arrays as C does + they add
-support for creation of arrays on-the-fly (what c++0x introduced with
+support for creation of arrays on-the-fly (what C++11 introduced with
this feature and more).</P>
<P>Done: Added syntax for {} member initialization in class
-constructor. Added testcase cpp0x_uniform_initialization. R11413</P>
+constructor. Added testcase cpp11_uniform_initialization. R11413</P>
<H2>Type inference [partially done]</H2>
-<P>A new keyword 'auto' is introduced in C++0x:</P>
+<P>A new keyword 'auto' is introduced in C++11:</P>
<PRE>auto a1 = 100;
auto a2 = myFunc();</PRE><P>
The type of a1 and a2 is automatically determined according to the
@@ -184,7 +184,7 @@ introduce a new SwigType for this.</P>
only.
</P>
<H2>Lambda functions and expressions [done]</H2>
-<P>C++0x introduces lambda functions defined as:</P>
+<P>C++11 introduces lambda functions defined as:</P>
<PRE STYLE="margin-bottom: 0.5cm">[](int x, int y) -&gt; int { return x + y; }</PRE><P>
If the lambda function contains a single return statement only or the
function doesn't return any type, the return type '-&gt;' can be
@@ -210,14 +210,14 @@ functions still work inside the function block though.</P>
<P>Article:
<A HREF="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2550.pdf">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2550.pdf</A></P>
<P>Done: Added syntax support for the lambda functions. Added
-testcase cpp0x_lambda_functions.i. R11491, R11492</P>
+testcase cpp11_lambda_functions.i. R11491, R11492</P>
<H2>Alternate function syntax [done]</H2>
<P>The problem with decltype() is that the parameters need to be
defined before the decltype. The following syntax is not valid,
because lhs and rhs hasn't been defined at the time of decltype:</P>
<PRE>template&lt; typename LHS, typename RHS&gt;
- decltype(lhs+rhs) AddingFunc(const LHS &amp;lhs, const RHS &amp;rhs) {return lhs + rhs;} //Not legal C++0x</PRE><P>
-The solution C++0x offers is the combination of the 'auto' keyword
+ decltype(lhs+rhs) AddingFunc(const LHS &amp;lhs, const RHS &amp;rhs) {return lhs + rhs;} //Not legal C++11</PRE><P>
+The solution C++11 offers is the combination of the 'auto' keyword
before and '-&gt; rettype' after the function declaration:</P>
<PRE>template&lt; typename LHS, typename RHS&gt;
auto AddingFunc(const LHS &amp;lhs, const RHS &amp;rhs) -&gt; decltype(lhs+rhs) {return lhs + rhs;}</PRE><P>
@@ -233,13 +233,13 @@ auto SomeStruct::FuncName(int x, int y) -&gt; int {
}</PRE><P>
Done: Added support for the 'auto' return type. Added support for the
'-&gt; type' after the funtion declaration. Added testcases
-cpp0x_alternate_function_syntax.i and
-cpp0x_alternate_function_syntax_runme.py. R11414</P>
+cpp11_alternate_function_syntax.i and
+cpp11_alternate_function_syntax_runme.py. R11414</P>
<H2>Concepts, Axioms [ignored]</H2>
<P>In C++ there is a common problem when you use a template in the
class which doesn't support all the operations the functions in the
class actually do on the type. Compiler errors are usually very long
-and unreadable. C++0x adds support for the &quot;concepts&quot;. The
+and unreadable. C++11 adds support for the &quot;concepts&quot;. The
idea is to define what operations and attributes should the template
have. In contrast to class inheritance and polimorphism, all lookups
are done in compile-time.
@@ -293,7 +293,7 @@ other constructs commonly associated with classes:
T top(const std::vector&lt;T&gt;&amp; v) { return v.back(); }
bool empty(const std::vector&lt;T&gt;&amp; v) { return v.empty(); }
};</PRE><P>
-Axioms are a facility pertaining to concepts supplied by C++0x to
+Axioms are a facility pertaining to concepts supplied by C++11 to
express the semantic properties of concepts. For example, the concept
Semigroup can be defined with an axiom Associativity as:
</P>
@@ -306,7 +306,7 @@ Semigroup can be defined with an axiom Associativity as:
Axioms are more like hints to the compiler to speed-up the process of
compilation.
</P>
-<P>Ignored: Concepts and axioms were removed from the C++0x standard.
+<P>Ignored: Concepts and axioms were removed from the C++11 standard.
</P>
<H2>Object construction improvement [done]</H2>
<P>This feature allows classes constructors to call other
@@ -335,7 +335,7 @@ the inherited class:
};</PRE><P>
Swig already correctly parses and produces the correct wrapper for
the “using” keyword.</P>
-<P>Done: Added testcase cpp0x_constructors.i which covers both
+<P>Done: Added testcase cpp11_constructors.i which covers both
constructor delegation and constructor inheritance. R11532</P>
<P>Problem: Constructor delegation and constructor inheritance is not
supported by any compiler yet, so it's impossible to try and test
@@ -351,11 +351,11 @@ this feature.</P>
values will work for the C++. And the other way around, nullptr
behaves as the ordinary pointer (false, if empty, true, if not
empty), so it's ok for swig to compare it.</P>
-<P>Done: Written a testcase cpp0x_null_pointer_constant.i and
-cpp0x_null_pointer_constant_runme.py to prove the nullptr
+<P>Done: Written a testcase cpp11_null_pointer_constant.i and
+cpp11_null_pointer_constant_runme.py to prove the nullptr
functionality. R11484</P>
<H2>Strongly typed enumerations [partially done]</H2>
-<P>C++0x introduces a new syntax for strongly typed enum declaration:
+<P>C++11 introduces a new syntax for strongly typed enum declaration:
</P>
<PRE> enum class Enumeration {
Val1,
@@ -371,16 +371,16 @@ int etc.:
<PRE STYLE="margin-bottom: 0.5cm"> enum class Enum2 : unsigned int {Val1, Val2};</PRE><P>
And it can be forward declared as well:
</P>
-<PRE> enum Enum1; //Illegal in C++ and C++0x; no size is explicitly specified.
- enum Enum2 : unsigned int; //Legal in C++0x.
- enum class Enum3; //Legal in C++0x, because enum class declarations have a default type of &quot;int&quot;.
- enum class Enum4: unsigned int; //Legal C++0x.
- enum Enum2 : unsigned short; //Illegal in C++0x, because Enum2 was previously declared with a different type.</PRE><P>
+<PRE> enum Enum1; //Illegal in C++ and C++11; no size is explicitly specified.
+ enum Enum2 : unsigned int; //Legal in C++11.
+ enum class Enum3; //Legal in C++11, because enum class declarations have a default type of &quot;int&quot;.
+ enum class Enum4: unsigned int; //Legal C++11.
+ enum Enum2 : unsigned short; //Illegal in C++11, because Enum2 was previously declared with a different type.</PRE><P>
Done: Added syntax 'enum class Name' and forward declarators 'enum
Name : inherited type' or 'enum class Name : inherited type' in
R11449.</P>
<P>TODO: Add semantic support for enum elements not clashing with
-enum elements in other enum classes. See cpp0x_strongly_typed_enums.i
+enum elements in other enum classes. See cpp11_strongly_typed_enums.i
warnings.</P>
<P>Problem: Swig currently doesn't support nested classes. This
feature should be implemented using a new nested class when using
@@ -396,7 +396,7 @@ following article as a base:
</P>
<P>Done: Added support for angle brackets. Used the preferred
&quot;Approach 1&quot;. Added a testcase named
-cpp0x_template_double_brackets. R11245</P>
+cpp11_template_double_brackets. R11245</P>
<H2>Explicit conversion operators [done]</H2>
<P>This is used when converting one type to another (eg. if
(myObject) {}, where myObject is your custom class converted to
@@ -407,9 +407,9 @@ supported in any target language (eg. python, php).
</P>
<P>Done: Swig already supports the keyword &quot;explicit&quot; for
function types as well. Added test case
-cpp0x_explicit_conversion_operators. R11323</P>
+cpp11_explicit_conversion_operators. R11323</P>
<H2>Template typedefs [partially done]</H2>
-<P>The new C++0x will allow creation of wrapper around the template.
+<P>The new C++11 will allow creation of wrapper around the template.
For example, if we want to do this:</P>
<PRE>template&lt; typename first, typename second, int third&gt;
class SomeType;
@@ -433,7 +433,7 @@ using PF = void (*)(double); // New introduced syntax</PRE><P>
Swig supports parsing typedefs for templates as well for example:</P>
<PRE STYLE="margin-bottom: 0.5cm">typedef List&lt;int&gt; intList;</PRE><P>
Done: Expanded support for the new 'using' syntax and template
-aliasing. Added testcase cpp0x_template_typedefs. R11533</P>
+aliasing. Added testcase cpp11_template_typedefs. R11533</P>
<P>TODO: Make Swig aware of the newly defined typedef. The TYPEDEF
keyword is part of the storage_class rule and type+declarator (see
c_decl rule) is the right part of the definition – for example void
@@ -443,7 +443,7 @@ type, type_right rules and declarator, direct_declarator,
notso_direct_declarator etc., which is PITA.</P>
<H2>Unrestricted unions [done]</H2>
<P>C++ currently offers usage of unions for types with trivial
-constructors only. The new C++0x standard allows usage of types with
+constructors only. The new C++11 standard allows usage of types with
non-trivial constructors as well:</P>
<PRE> struct point {
point() {}
@@ -453,14 +453,14 @@ non-trivial constructors as well:</P>
union P {
int z;
double w;
- point p; // Illegal in C++; point has a non-trivial constructor. However, this is legal in C++0x.
+ point p; // Illegal in C++; point has a non-trivial constructor. However, this is legal in C++11.
} p1;</PRE><P>
Swig already parses the given syntax.</P>
-<P>Done: Added testcase cpp0x_unrestricted_unions. R11435, R11447</P>
+<P>Done: Added testcase cpp11_unrestricted_unions. R11435, R11447</P>
<P>Problem: GCC doesn't support unrestricted unions yet so there is
no way to actually test, if it works.</P>
<H2>Variadic templates [partially done]</H2>
-<P>The new C++0x offers the following syntax:</P>
+<P>The new C++11 offers the following syntax:</P>
<PRE STYLE="margin-bottom: 0.5cm">template&lt;typename... Values&gt; class tuple;</PRE><P>
This can be used for example:</P>
<PRE STYLE="margin-bottom: 0.5cm">class tuple&lt;int, std::vector&lt;int&gt;, std::map&lt;std::string, std::vector&lt;int&gt;&gt;&gt; someInstanceName;</PRE><P>
@@ -502,7 +502,7 @@ A new extension to sizeof is also introduced with this feature. The
}
// SomeStruct&lt;Type1, Type2&gt;::size is 2 and SomeStruct&lt;&gt;::size is 0</PRE><P>
Done: Added syntax support for 'typename' or 'class' + ... + id.
-Added testcase cpp0x_variadic_templates. R11458</P>
+Added testcase cpp11_variadic_templates. R11458</P>
<P>Done: Added syntax support for BaseClass + ..., type + ... + id in
parameters and baseclass + ... for intializers after constructor.
Extended Swig syntax to support sizeof...(Args). R11467</P>
@@ -510,11 +510,11 @@ Extended Swig syntax to support sizeof...(Args). R11467</P>
<P>TODO: Only (if present) first variadically defined argument is
currently used in %template directive. The next ones are ignored.</P>
<H2>New string literals [partially done]</H2>
-<P>Beside the implementation, the new C++0x Unicode and custom
+<P>Beside the implementation, the new C++11 Unicode and custom
delimeter constants can occur in templates in the header file.
</P>
<P>Done: Added symbols 'u', 'u8' and 'U' to mark the beginning of the
-UTF string. Also added test case cpp0x_raw_string_literals. R11327</P>
+UTF string. Also added test case cpp11_raw_string_literals. R11327</P>
<P>Done: Added R&quot;DELIMITER[, ]DELIMITER&quot; for a custom
delimiter for the beginning/end of the string. R11328</P>
<P>TODO: Fix the Swig's C++ preprocessor bug when parsing an odd
@@ -524,7 +524,7 @@ Source/Preprocessor/cpp.c.</P>
<P>C++ has different suffix literals. eg. 12.5f marks the number 12.5
as float.
</P>
-<P>C++0x allows user to define his own suffix for the strings always
+<P>C++11 allows user to define his own suffix for the strings always
starting with the underscore (_). eg. int a = &quot;hello&quot;_mySuffix;
</P>
<P>The syntax is similar to other operator overloading functions:
@@ -548,18 +548,18 @@ Another possibility is to use variadic templates:
This instantiates the literal processing function as
operator&quot;&quot;_Suffix&lt;'1', '2', '3', '4'&gt;. In this form,
there is no terminating null character to the string. The main
-purpose to doing this is to use C++0x's constexpr keyword and the
+purpose to doing this is to use C++11's constexpr keyword and the
compiler to allow the literal to be transformed entirely at compile
time, assuming OutputType is a constexpr-constructable and copyable
type, and the literal processing function is a constexpr function.</P>
<P>Article:
<A HREF="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf</A></P>
<P>Done: Added syntax support for userdefined literals. Added
-testcase cpp0x_userdefined_literals.i. R11494</P>
+testcase cpp11_userdefined_literals.i. R11494</P>
<P>TODO: %rename doesn't parse operator”” yet.</P>
<H2>Thread-local storage [done]
</H2>
-<P>New C++0x introduces keyword &quot;thread_local&quot; which marks
+<P>New C++11 introduces keyword &quot;thread_local&quot; which marks
the following variable dynamically located depending on the current
thread when using the address-of (&amp;) operator.
</P>
@@ -569,7 +569,7 @@ thread when using the address-of (&amp;) operator.
thread_local int val;
};</PRE><P>
Done: Add &quot;thread_local&quot; keyword to Swig. Added testcase
-cpp0x_thread_local. R11393</P>
+cpp11_thread_local. R11393</P>
<H2>Defaulting/deleting of standard functions on C++ objects [done]</H2>
<P>C++ automatically creates default constructor with empty
parameters, copy constructor, operator= and destructor for any class.
@@ -600,11 +600,11 @@ the standard functions brought by C++ itself.
Ignored: Swig already parses the keywords &quot;= delete&quot; and &quot;=
default&quot;. These keywords are used for built-in functions (copy
constructor, operator= etc.), which are ignored by Swig anyway.</P>
-<P>Done: Added testcase cpp0x_default_delete. R11535</P>
+<P>Done: Added testcase cpp11_default_delete. R11535</P>
<H2>Type long long int [done]</H2>
<P>Type long long int is an integer type that has at least 64 useful
bits. C99 added it to its standard, but the C++ didn't adopt it until
-C++0x. Most C++ compilers supported it though.
+C++11. Most C++ compilers supported it though.
</P>
<P>Done: Swig already parses the C code including the long long type.
</P>
@@ -616,18 +616,18 @@ C++0x. Most C++ compilers supported it though.
static_assert(sizeof(int) &lt;= sizeof(T), &quot;not big enough&quot;);
};</PRE><P>
Done: Added syntax support for &quot;static_assert()&quot;. Added
-test case cpp0x_static_assert. R11369</P>
+test case cpp11_static_assert. R11369</P>
<H2>Allow sizeof to work on members of classes without an explicit
object [done]</H2>
-<P>C++0x allows calls of sizeof to concrete objects as well:
+<P>C++11 allows calls of sizeof to concrete objects as well:
</P>
<PRE> struct A { int member; };
- sizeof(A::member); //Does not work with C++03. Okay with C++0x</PRE><P>
+ sizeof(A::member); //Does not work with C++03. Okay with C++11</PRE><P>
This kind of syntax is already supported by Swig.</P>
-<P>Done: Added testcase cpp0x_sizeof_objects. R11538
+<P>Done: Added testcase cpp11_sizeof_objects. R11538
</P>
<H2>Threading facilities [ignored]</H2>
-<P>C++0x will add the following classes to the standard library:
+<P>C++11 will add the following classes to the standard library:
</P>
<PRE> * std::thread
* std::mutex, std::recursive_mutex
@@ -637,7 +637,7 @@ This kind of syntax is already supported by Swig.</P>
Ignored: No changes to the language itself is made.
</P>
<H2>Tuple types [TODO]</H2>
-<P>Tuple is array of various types. C++0x introduced this feature
+<P>Tuple is array of various types. C++11 introduced this feature
using variadic templates. Tuple is defined as:</P>
<PRE STYLE="margin-bottom: 0.5cm">template &lt;class ...Types&gt; class tuple;</PRE><P>
Constructor is automatically generated filling the tuple elements.
@@ -655,7 +655,7 @@ t1 = t2 ; // Ok, first two elements can be converted,
// the third one can be constructed from a 'const char *'.</PRE><P>
TODO: Implement wrappers for the tuplet&lt;&gt; class.</P>
<H2>Hash tables [TODO]</H2>
-<P>C++0x introduces the &quot;unordered&quot; version of existing
+<P>C++11 introduces the &quot;unordered&quot; version of existing
types, which in practice work faster than the linear types:
</P>
<PRE> - unordered set
@@ -671,7 +671,7 @@ aliasing unordered classes to ordered ones doesn't work.</P>
<P>TODO: Implement wrappers for unordered_ types. Initial work is
already done in Lib/std/unordered_*.i files.</P>
<H2>Regular expressions [ignored]</H2>
-<P>Two new classes are introduced in C++0x: basic_regex and
+<P>Two new classes are introduced in C++11: basic_regex and
match_results. Both are defined in regex header file.
</P>
<P>Ignored: The new feature extends the standardy library only. No
@@ -725,9 +725,9 @@ changes to Swig needed.
};</PRE><P>
Swig already supports the two.</P>
<P>Done: Added a runtime testcase for function objects
-cpp0x_function_objects. R11419.</P>
+cpp11_function_objects. R11419.</P>
<H2>Type traits for metaprogramming [ignored]</H2>
-<P>C++0x adds a new header file &lt;type_traits&gt; which includes
+<P>C++11 adds a new header file &lt;type_traits&gt; which includes
helper functions to determine the template type while initializing
the object at compile time.
</P>
@@ -783,6 +783,6 @@ class calculus_ver2 {
Swig correctly parses the result_of class.</P>
<P>TODO: The return type (the result_of::type member) is not
calculated by Swig. This needs a much more complex semantic parser.</P>
-<P>Done: Added testcase cpp0x_result_of. R11534</P>
+<P>Done: Added testcase cpp11_result_of. R11534</P>
</BODY>
-</HTML> \ No newline at end of file
+</HTML>
diff --git a/Doc/Manual/Cpp0x.html b/Doc/Manual/CPlusPlus11.html
index 457a7e41d..3caec748e 100644
--- a/Doc/Manual/Cpp0x.html
+++ b/Doc/Manual/CPlusPlus11.html
@@ -1,54 +1,54 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
-<title>SWIG and C++0x</title>
+<title>SWIG and C++11</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body bgcolor="#ffffff">
-<H1><a name="Cpp0x"></a>7 SWIG and C++0x</H1>
+<H1><a name="CPlusPlus11"></a>7 SWIG and C++11</H1>
<!-- INDEX -->
<div class="sectiontoc">
<ul>
-<li><a href="#Cpp0x_Introduction">Introduction</a>
-<li><a href="#Cpp0x_Core_language_changes">Core language changes</a>
+<li><a href="#CPlusPlus11_Introduction">Introduction</a>
+<li><a href="#CPlusPlus11_Core_language_changes">Core language changes</a>
<ul>
-<li><a href="#Cpp0x_Rvalue_reference_and_move_semantics">Rvalue reference and move semantics</a>
-<li><a href="#Cpp0x_Generalized_constant_expressions">Generalized constant expressions</a>
-<li><a href="#Cpp0x_Extern_template">Extern template</a>
-<li><a href="#Cpp0x_Initializer_lists">Initializer lists</a>
-<li><a href="#Cpp0x_Uniform_initialization">Uniform initialization</a>
-<li><a href="#Cpp0x_Type_inference">Type inference</a>
-<li><a href="#Cpp0x_Range_based_for_loop">Range-based for-loop</a>
-<li><a href="#Cpp0x_Lambda_functions_and_expressions">Lambda functions and expressions</a>
-<li><a href="#Cpp0x_Alternate_function_syntax">Alternate function syntax</a>
-<li><a href="#Cpp0x_Object_construction_improvement">Object construction improvement</a>
-<li><a href="#Cpp0x_Null_pointer_constant">Null pointer constant</a>
-<li><a href="#Cpp0x_Strongly_typed_enumerations">Strongly typed enumerations</a>
-<li><a href="#Cpp0x_Double_angle_brackets">Double angle brackets</a>
-<li><a href="#Cpp0x_Explicit_conversion_operators">Explicit conversion operators</a>
-<li><a href="#Cpp0x_Alias_templates">Alias templates</a>
-<li><a href="#Cpp0x_Unrestricted_unions">Unrestricted unions</a>
-<li><a href="#Cpp0x_Variadic_templates">Variadic templates</a>
-<li><a href="#Cpp0x_New_string_literals">New string literals</a>
-<li><a href="#Cpp0x_User_defined_literals">User-defined literals</a>
-<li><a href="#Cpp0x_Thread_local_storage">Thread-local storage</a>
-<li><a href="#Cpp0x_Defaulting/deleting_of_standard_functions_on_C++_objects">Defaulting/deleting of standard functions on C++ objects</a>
-<li><a href="#Cpp0x_Type_long_long_int">Type long long int</a>
-<li><a href="#Cpp0x_Static_assertions">Static assertions</a>
-<li><a href="#Cpp0x_Allow_sizeof_to_work_on_members_of_classes_without_an_explicit_object">Allow sizeof to work on members of classes without an explicit object</a>
+<li><a href="#CPlusPlus11_Rvalue_reference_and_move_semantics">Rvalue reference and move semantics</a>
+<li><a href="#CPlusPlus11_Generalized_constant_expressions">Generalized constant expressions</a>
+<li><a href="#CPlusPlus11_Extern_template">Extern template</a>
+<li><a href="#CPlusPlus11_Initializer_lists">Initializer lists</a>
+<li><a href="#CPlusPlus11_Uniform_initialization">Uniform initialization</a>
+<li><a href="#CPlusPlus11_Type_inference">Type inference</a>
+<li><a href="#CPlusPlus11_Range_based_for_loop">Range-based for-loop</a>
+<li><a href="#CPlusPlus11_Lambda_functions_and_expressions">Lambda functions and expressions</a>
+<li><a href="#CPlusPlus11_Alternate_function_syntax">Alternate function syntax</a>
+<li><a href="#CPlusPlus11_Object_construction_improvement">Object construction improvement</a>
+<li><a href="#CPlusPlus11_Null_pointer_constant">Null pointer constant</a>
+<li><a href="#CPlusPlus11_Strongly_typed_enumerations">Strongly typed enumerations</a>
+<li><a href="#CPlusPlus11_Double_angle_brackets">Double angle brackets</a>
+<li><a href="#CPlusPlus11_Explicit_conversion_operators">Explicit conversion operators</a>
+<li><a href="#CPlusPlus11_Alias_templates">Alias templates</a>
+<li><a href="#CPlusPlus11_Unrestricted_unions">Unrestricted unions</a>
+<li><a href="#CPlusPlus11_Variadic_templates">Variadic templates</a>
+<li><a href="#CPlusPlus11_New_string_literals">New string literals</a>
+<li><a href="#CPlusPlus11_User_defined_literals">User-defined literals</a>
+<li><a href="#CPlusPlus11_Thread_local_storage">Thread-local storage</a>
+<li><a href="#CPlusPlus11_Defaulting/deleting_of_standard_functions_on_C++_objects">Defaulting/deleting of standard functions on C++ objects</a>
+<li><a href="#CPlusPlus11_Type_long_long_int">Type long long int</a>
+<li><a href="#CPlusPlus11_Static_assertions">Static assertions</a>
+<li><a href="#CPlusPlus11_Allow_sizeof_to_work_on_members_of_classes_without_an_explicit_object">Allow sizeof to work on members of classes without an explicit object</a>
</ul>
-<li><a href="#Cpp0x_Standard_library_changes">Standard library changes</a>
+<li><a href="#CPlusPlus11_Standard_library_changes">Standard library changes</a>
<ul>
-<li><a href="#Cpp0x_Threading_facilities">Threading facilities</a>
-<li><a href="#Cpp0x_Tuple_types">Tuple types and hash tables</a>
-<li><a href="#Cpp0x_Regular_expressions">Regular expressions</a>
-<li><a href="#Cpp0x_General_purpose_smart_pointers">General-purpose smart pointers</a>
-<li><a href="#Cpp0x_Extensible_random_number_facility">Extensible random number facility</a>
-<li><a href="#Cpp0x_Wrapper_reference">Wrapper reference</a>
-<li><a href="#Cpp0x_Polymorphous_wrappers_for_function_objects">Polymorphous wrappers for function objects</a>
-<li><a href="#Cpp0x_Type_traits_for_metaprogramming">Type traits for metaprogramming</a>
-<li><a href="#Cpp0x_Uniform_method_for_computing_return_type_of_function_objects">Uniform method for computing return type of function objects</a>
+<li><a href="#CPlusPlus11_Threading_facilities">Threading facilities</a>
+<li><a href="#CPlusPlus11_Tuple_types">Tuple types and hash tables</a>
+<li><a href="#CPlusPlus11_Regular_expressions">Regular expressions</a>
+<li><a href="#CPlusPlus11_General_purpose_smart_pointers">General-purpose smart pointers</a>
+<li><a href="#CPlusPlus11_Extensible_random_number_facility">Extensible random number facility</a>
+<li><a href="#CPlusPlus11_Wrapper_reference">Wrapper reference</a>
+<li><a href="#CPlusPlus11_Polymorphous_wrappers_for_function_objects">Polymorphous wrappers for function objects</a>
+<li><a href="#CPlusPlus11_Type_traits_for_metaprogramming">Type traits for metaprogramming</a>
+<li><a href="#CPlusPlus11_Uniform_method_for_computing_return_type_of_function_objects">Uniform method for computing return type of function objects</a>
</ul>
</ul>
</div>
@@ -56,22 +56,22 @@
-<H2><a name="Cpp0x_Introduction"></a>7.1 Introduction</H2>
+<H2><a name="CPlusPlus11_Introduction"></a>7.1 Introduction</H2>
<p>This chapter gives you a brief overview about the SWIG
-implementation of the C++0x standard. This part of SWIG is still a work in
-progress. Initial C++0x support for SWIG was written during the
+implementation of the C++11 standard. This part of SWIG is still a work in
+progress. Initial C++11 support for SWIG was written during the
Google Summer of Code 2009 period.</p>
<p>SWIG supports all the new C++ syntax changes with some minor limitations
(decltype expressions, variadic templates number). Wrappers for the
new STL types (unordered_ containers, result_of, tuples) are not supported
yet.</p>
-<H2><a name="Cpp0x_Core_language_changes"></a>7.2 Core language changes</H2>
+<H2><a name="CPlusPlus11_Core_language_changes"></a>7.2 Core language changes</H2>
-<H3><a name="Cpp0x_Rvalue_reference_and_move_semantics"></a>7.2.1 Rvalue reference and move semantics</H3>
+<H3><a name="CPlusPlus11_Rvalue_reference_and_move_semantics"></a>7.2.1 Rvalue reference and move semantics</H3>
<p>SWIG correctly parses the new operator &amp;&amp; the same as the reference operator &amp;.</p>
@@ -87,7 +87,7 @@ class MyClass {
};
</pre></div>
-<H3><a name="Cpp0x_Generalized_constant_expressions"></a>7.2.2 Generalized constant expressions</H3>
+<H3><a name="CPlusPlus11_Generalized_constant_expressions"></a>7.2.2 Generalized constant expressions</H3>
<p>SWIG correctly parses the keyword <tt>constexpr</tt>, but ignores its functionality. Constant functions cannot be used as constants.</p>
@@ -105,7 +105,7 @@ constexpr int myConstFunc() { return MY_CONST; }
const int a = MY_CONST; // ok
</pre></div>
-<H3><a name="Cpp0x_Extern_template"></a>7.2.3 Extern template</H3>
+<H3><a name="CPlusPlus11_Extern_template"></a>7.2.3 Extern template</H3>
<p>SWIG correctly parses the keywords <tt>extern template</tt>. However, the explicit template instantiation is not used by SWIG, a <tt>%template</tt> is still required.</p>
@@ -123,7 +123,7 @@ public:
};
</pre></div>
-<H3><a name="Cpp0x_Initializer_lists"></a>7.2.4 Initializer lists</H3>
+<H3><a name="CPlusPlus11_Initializer_lists"></a>7.2.4 Initializer lists</H3>
<p>
Initializer lists are very much a C++ compiler construct and are not very accessible from wrappers as
@@ -254,7 +254,7 @@ Note that the default typemap for <tt>std::initializer_list</tt> does nothing bu
and hence any user supplied typemaps will override it and suppress the warning.
</p>
-<H3><a name="Cpp0x_Uniform_initialization"></a>7.2.5 Uniform initialization</H3>
+<H3><a name="CPlusPlus11_Uniform_initialization"></a>7.2.5 Uniform initialization</H3>
<p>The curly brackets {} for member initialization are fully
@@ -287,7 +287,7 @@ AltStruct var2{2, 4.3}; // calls the constructor
142.15
</pre></div>
-<H3><a name="Cpp0x_Type_inference"></a>7.2.6 Type inference</H3>
+<H3><a name="CPlusPlus11_Type_inference"></a>7.2.6 Type inference</H3>
<p>SWIG supports <tt>decltype()</tt> with some limitations. Single
@@ -304,13 +304,13 @@ int i; int j;
decltype(i+j) k; // syntax error
</pre></div>
-<H3><a name="Cpp0x_Range_based_for_loop"></a>7.2.7 Range-based for-loop</H3>
+<H3><a name="CPlusPlus11_Range_based_for_loop"></a>7.2.7 Range-based for-loop</H3>
<p>This feature is part of the implementation block only. SWIG
ignores it.</p>
-<H3><a name="Cpp0x_Lambda_functions_and_expressions"></a>7.2.8 Lambda functions and expressions</H3>
+<H3><a name="CPlusPlus11_Lambda_functions_and_expressions"></a>7.2.8 Lambda functions and expressions</H3>
<p>SWIG correctly parses most of the Lambda functions syntax. For example:</p>
@@ -336,7 +336,7 @@ auto six = [](int x, int y) { return x+y; }(4, 2);
Better support should be available in a later release.
</p>
-<H3><a name="Cpp0x_Alternate_function_syntax"></a>7.2.9 Alternate function syntax</H3>
+<H3><a name="CPlusPlus11_Alternate_function_syntax"></a>7.2.9 Alternate function syntax</H3>
<p>SWIG fully supports the new definition of functions. For example:</p>
@@ -346,7 +346,7 @@ struct SomeStruct {
};
</pre></div>
-<p>can now be written as in C++0x:</p>
+<p>can now be written as in C++11:</p>
<div class="code"><pre>
struct SomeStruct {
@@ -371,7 +371,7 @@ auto SomeStruct::FuncName(int x, int y) -&gt; int {
auto square(float a, float b) -&gt; decltype(a);
</pre></div>
-<H3><a name="Cpp0x_Object_construction_improvement"></a>7.2.10 Object construction improvement</H3>
+<H3><a name="CPlusPlus11_Object_construction_improvement"></a>7.2.10 Object construction improvement</H3>
<p>
@@ -412,12 +412,12 @@ class DerivedClass: public BaseClass {
};
</pre></div>
-<H3><a name="Cpp0x_Null_pointer_constant"></a>7.2.11 Null pointer constant</H3>
+<H3><a name="CPlusPlus11_Null_pointer_constant"></a>7.2.11 Null pointer constant</H3>
<p>The <tt>nullptr</tt> constant is largely unimportant in wrappers. In the few places it has an effect, it is treated like <tt>NULL</tt>.</p>
-<H3><a name="Cpp0x_Strongly_typed_enumerations"></a>7.2.12 Strongly typed enumerations</H3>
+<H3><a name="CPlusPlus11_Strongly_typed_enumerations"></a>7.2.12 Strongly typed enumerations</H3>
<p>SWIG parses the new <tt>enum class</tt> syntax and forward declarator for the enums:</p>
@@ -468,7 +468,7 @@ class AllColors {
};
</pre></div>
-<H3><a name="Cpp0x_Double_angle_brackets"></a>7.2.13 Double angle brackets</H3>
+<H3><a name="CPlusPlus11_Double_angle_brackets"></a>7.2.13 Double angle brackets</H3>
<p>SWIG correctly parses the symbols &gt;&gt; as closing the
@@ -479,7 +479,7 @@ shift operator &gt;&gt; otherwise.</p>
std::vector&lt;std::vector&lt;int&gt;&gt; myIntTable;
</pre></div>
-<H3><a name="Cpp0x_Explicit_conversion_operators"></a>7.2.14 Explicit conversion operators</H3>
+<H3><a name="CPlusPlus11_Explicit_conversion_operators"></a>7.2.14 Explicit conversion operators</H3>
<p>SWIG correctly parses the keyword <tt>explicit</tt> both for operators and constructors.
@@ -515,7 +515,7 @@ SWIG target languages, because all use their own facilities (eg. classes Cloneab
to achieve particular copy and compare behaviours.
</p>
-<H3><a name="Cpp0x_Alias_templates"></a>7.2.15 Alias templates</H3>
+<H3><a name="CPlusPlus11_Alias_templates"></a>7.2.15 Alias templates</H3>
<p>
The following is an example of an alias template:
@@ -567,7 +567,7 @@ example.i:17: Warning 341: The 'using' keyword in type aliasing is not fully sup
typedef void (*PFD)(double); // The old style
</pre></div>
-<H3><a name="Cpp0x_Unrestricted_unions"></a>7.2.16 Unrestricted unions</H3>
+<H3><a name="CPlusPlus11_Unrestricted_unions"></a>7.2.16 Unrestricted unions</H3>
<p>SWIG fully supports any type inside a union even if it does not
@@ -593,7 +593,7 @@ union P {
} p1;
</pre></div>
-<H3><a name="Cpp0x_Variadic_templates"></a>7.2.17 Variadic templates</H3>
+<H3><a name="CPlusPlus11_Variadic_templates"></a>7.2.17 Variadic templates</H3>
<p>SWIG supports the variadic templates syntax (inside the &lt;&gt;
@@ -628,7 +628,7 @@ 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="Cpp0x_New_string_literals"></a>7.2.18 New string literals</H3>
+<H3><a name="CPlusPlus11_New_string_literals"></a>7.2.18 New string literals</H3>
<p>SWIG supports unicode string constants and raw string literals.</p>
@@ -652,7 +652,7 @@ const char32_t *ii = UR"XXX(I'm a "raw UTF-32" \ string.)XXX";
<p>Note: SWIG currently incorrectly parses the odd number of double quotes
inside the string due to SWIG's C++ preprocessor.</p>
-<H3><a name="Cpp0x_User_defined_literals"></a>7.2.19 User-defined literals</H3>
+<H3><a name="CPlusPlus11_User_defined_literals"></a>7.2.19 User-defined literals</H3>
<p>
@@ -719,7 +719,7 @@ OutputType var2 = 1234_suffix;
OutputType var3 = 3.1416_suffix;
</pre></div>
-<H3><a name="Cpp0x_Thread_local_storage"></a>7.2.20 Thread-local storage</H3>
+<H3><a name="CPlusPlus11_Thread_local_storage"></a>7.2.20 Thread-local storage</H3>
<p>SWIG correctly parses the <tt>thread_local</tt> keyword. For example, variable
@@ -739,7 +739,7 @@ A variable will be thread local if accessed from different threads from the targ
same way that it will be thread local if accessed from C++ code.
</p>
-<H3><a name="Cpp0x_Defaulting/deleting_of_standard_functions_on_C++_objects"></a>7.2.21 Defaulting/deleting of standard functions on C++ objects</H3>
+<H3><a name="CPlusPlus11_Defaulting/deleting_of_standard_functions_on_C++_objects"></a>7.2.21 Defaulting/deleting of standard functions on C++ objects</H3>
<p>SWIG correctly parses the <tt>= delete</tt> and <tt>= default</tt>
@@ -757,12 +757,12 @@ struct NonCopyable {
<p>This feature is specific to C++ only. The defaulting/deleting is currently ignored, because SWIG
automatically produces wrappers for special constructors and operators specific to the target language.</p>
-<H3><a name="Cpp0x_Type_long_long_int"></a>7.2.22 Type long long int</H3>
+<H3><a name="CPlusPlus11_Type_long_long_int"></a>7.2.22 Type long long int</H3>
<p>SWIG correctly parses and uses the new <tt>long long</tt> type already introduced in C99 some time ago.</p>
-<H3><a name="Cpp0x_Static_assertions"></a>7.2.23 Static assertions</H3>
+<H3><a name="CPlusPlus11_Static_assertions"></a>7.2.23 Static assertions</H3>
<p>SWIG correctly parses and calls the new <tt>static_assert</tt> function.</p>
@@ -774,7 +774,7 @@ struct Check {
};
</pre></div>
-<H3><a name="Cpp0x_Allow_sizeof_to_work_on_members_of_classes_without_an_explicit_object"></a>7.2.24 Allow sizeof to work on members of classes without an explicit object</H3>
+<H3><a name="CPlusPlus11_Allow_sizeof_to_work_on_members_of_classes_without_an_explicit_object"></a>7.2.24 Allow sizeof to work on members of classes without an explicit object</H3>
<p>SWIG correctly calls the sizeof() on types as well as on the
@@ -785,7 +785,7 @@ struct A {
int member;
};
-const int SIZE = sizeof(A::member); // does not work with C++03. Okay with C++0x
+const int SIZE = sizeof(A::member); // does not work with C++03. Okay with C++11
</pre></div>
<p>In Python:</p>
@@ -794,28 +794,28 @@ const int SIZE = sizeof(A::member); // does not work with C++03. Okay with C++0x
8
</pre></div>
-<H2><a name="Cpp0x_Standard_library_changes"></a>7.3 Standard library changes</H2>
+<H2><a name="CPlusPlus11_Standard_library_changes"></a>7.3 Standard library changes</H2>
-<H3><a name="Cpp0x_Threading_facilities"></a>7.3.1 Threading facilities</H3>
+<H3><a name="CPlusPlus11_Threading_facilities"></a>7.3.1 Threading facilities</H3>
<p>SWIG does not currently wrap or use any of the new threading
classes introduced (thread, mutex, locks, condition variables, task). The main reason is that
SWIG target languages offer their own threading facilities that do not rely on C++.</p>
-<H3><a name="Cpp0x_Tuple_types"></a>7.3.2 Tuple types and hash tables</H3>
+<H3><a name="CPlusPlus11_Tuple_types"></a>7.3.2 Tuple types and hash tables</H3>
<p>SWIG does not wrap the new tuple types and the unordered_ container classes yet. Variadic template support is working so it is possible to
include the tuple header file; it is parsed without any problems.</p>
-<H3><a name="Cpp0x_Regular_expressions"></a>7.3.3 Regular expressions</H3>
+<H3><a name="CPlusPlus11_Regular_expressions"></a>7.3.3 Regular expressions</H3>
-<p>SWIG does not wrap the new C++0x regular expressions classes, because the SWIG target languages use their own facilities for this.</p>
+<p>SWIG does not wrap the new C++11 regular expressions classes, because the SWIG target languages use their own facilities for this.</p>
-<H3><a name="Cpp0x_General_purpose_smart_pointers"></a>7.3.4 General-purpose smart pointers</H3>
+<H3><a name="CPlusPlus11_General_purpose_smart_pointers"></a>7.3.4 General-purpose smart pointers</H3>
<p>
@@ -823,12 +823,12 @@ SWIG provides special smart pointer handling for <tt>std::tr1::shared_ptr</tt> i
There is no special smart pointer handling available for <tt>std::weak_ptr</tt> and <tt>std::unique_ptr</tt>.
</p>
-<H3><a name="Cpp0x_Extensible_random_number_facility"></a>7.3.5 Extensible random number facility</H3>
+<H3><a name="CPlusPlus11_Extensible_random_number_facility"></a>7.3.5 Extensible random number facility</H3>
<p>This feature extends and standardizes the standard library only and does not effect the C++ language and SWIG.</p>
-<H3><a name="Cpp0x_Wrapper_reference"></a>7.3.6 Wrapper reference</H3>
+<H3><a name="CPlusPlus11_Wrapper_reference"></a>7.3.6 Wrapper reference</H3>
<p>The new ref and cref classes are used to instantiate a parameter as a reference of a template function. For example:</p>
@@ -853,7 +853,7 @@ int main() {
<p>The ref and cref classes are not wrapped by SWIG because the SWIG target languages do not support referencing.</p>
-<H3><a name="Cpp0x_Polymorphous_wrappers_for_function_objects"></a>7.3.7 Polymorphous wrappers for function objects</H3>
+<H3><a name="CPlusPlus11_Polymorphous_wrappers_for_function_objects"></a>7.3.7 Polymorphous wrappers for function objects</H3>
<p>
@@ -884,7 +884,7 @@ t = Test()
b = t(1,2) # invoke C++ function object
</pre></div>
-<H3><a name="Cpp0x_Type_traits_for_metaprogramming"></a>7.3.8 Type traits for metaprogramming</H3>
+<H3><a name="CPlusPlus11_Type_traits_for_metaprogramming"></a>7.3.8 Type traits for metaprogramming</H3>
<p>The new C++ metaprogramming is useful at compile time and is aimed specifically for C++ development:</p>
@@ -909,7 +909,7 @@ template&lt; class T1, class T2 &gt; int elaborate( T1 A, T2 B ) {
<p>SWIG correctly parses the template specialization, template types and values inside the &lt;&gt; block and the new helper functions: is_convertible, is_integral, is_const etc.
However, SWIG still explicitly requires concrete types when using the <tt>%template</tt> directive, so the C++ metaprogramming features are not really of interest at runtime in the target languages.</p>
-<H3><a name="Cpp0x_Uniform_method_for_computing_return_type_of_function_objects"></a>7.3.9 Uniform method for computing return type of function objects</H3>
+<H3><a name="CPlusPlus11_Uniform_method_for_computing_return_type_of_function_objects"></a>7.3.9 Uniform method for computing return type of function objects</H3>
<p>SWIG does not wrap the new result_of class introduced in the &lt;functional&gt; header and map the result_of::type to the concrete type yet. For example:</p>
diff --git a/Doc/Manual/chapters b/Doc/Manual/chapters
index fd21651e3..45d35e793 100644
--- a/Doc/Manual/chapters
+++ b/Doc/Manual/chapters
@@ -4,7 +4,7 @@ Windows.html
Scripting.html
SWIG.html
SWIGPlus.html
-Cpp0x.html
+CPlusPlus11.html
Preprocessor.html
Library.html
Arguments.html