swig/Examples/test-suite/cpp0x_smart_pointers.i
2010-06-26 22:48:49 +00:00

19 lines
421 B
OpenEdge ABL

/* 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);
};
%}