swig/SWIG/Examples/test-suite/private_assign.i
Marcelo Matus faa9419662 fixes for SwigValueWrapper
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6444 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-19 23:39:36 +00:00

35 lines
491 B
OpenEdge ABL

// A class with a private assignment operator.
// This is rare, but sometimes used with singletons and
// objects that have complicated state.
%module private_assign
%inline %{
class Foo {
private:
Foo &operator=(const Foo &f) {
return *this;
}
public:
void bar() { }
};
Foo blah() {
return Foo();
}
%}
#ifdef SWIGPYTHON
// This case only works in python
%inline %{
struct Bar : Foo
{
};
Bar bar;
%}
#endif