Better clarify C++11 smart pointer support

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@13844 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-09-20 19:28:20 +00:00
commit 3578be5753
3 changed files with 4 additions and 21 deletions

View file

@ -590,7 +590,10 @@ include the tuple header file; it is parsed without any problems.</p>
<H3><a name="Cpp0x_General_purpose_smart_pointers"></a>7.3.4 General-purpose smart pointers</H3>
<p>SWIG does not wrap the new shared, weak and unique smart pointers, because the SWIG target languages offer their own garbage collectors.</p>
<p>
SWIG provides special smart pointer handling for <tt>std::tr1::shared_ptr</tt> in the same way it has support for <tt>boost::shared_ptr</tt>.
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>

View file

@ -454,7 +454,6 @@ CPP0X_TEST_CASES = \
# cpp0x_constructors \ # not supported by any compiler yet
# cpp0x_hash_tables \ # not fully implemented yet
# cpp0x_lambda_functions \ # not supported by GCC or MSVC yet
# cpp0x_smart_pointers \ # not supported by standard library yet
# cpp0x_template_typedefs \ # not supported by any compiler yet
# cpp0x_thread_local \ # not supported by any compiler yet
# cpp0x_unrestricted_unions \ # not supported by any compiler yet (now in gcc-4.6)

View file

@ -1,19 +0,0 @@
/* This testcase checks whether SWIG correctly uses the new general-purpose
smart pointers introduced in C++0x:
- shared_ptr
- weak_ptr
- unique_ptr
*/
%module cpp0x_smart_pointers
%inline %{
#include <tr1/shared_ptr.h>
#include <tr1/unique_ptr.h>
#include <tr1/weak_ptr.h>
struct A {
std::shared_ptr<double> a1(new double);
std::unique_ptr<double> a2(new double);
std::weak_ptr<double> a3(a1);
};
%}