[C++-sig] static const object access?

Gavin Doughtie gdoughtie at anim.dreamworks.com
Tue Jun 10 02:28:08 CEST 2003


let's say I have a class:

class A
{
// implementation of a special "Null" object
};

and another

class B
{
private:
	static const A;
public:
	static const A& getNullA() const {
		return A;
	}
};

In python, I'd like B.getNullA() to always return the same python 
object, which in turn is initially populated by the C++ getNullA() call.

I was trying to use "return_internal_reference" for the getNullA() 
method def, but in python I get a "tuple index out of range" error.

Enlightenment, anyone? Thanks!


-- 
Gavin Doughtie
DreamWorks SKG





More information about the Cplusplus-sig mailing list