[C++-sig] Wrapping boost::multi_array

Thomas Kolb chilavert123 at gmx.net
Thu Jun 16 09:49:14 CEST 2005


Thomas Kolb schrieb:

> namespace  {
> 
> 	typedef boost::multi_array<double, 1> DoubleVector;	
> 
> 	DoubleVector* cTorWrapper(unsigned int size)
> 	{
> 		return new DoubleVector(boost::extents[size]);
> 	}
> 	
> 	double& operatorWrapper(DoubleVector& vec, DoubleVector::size_type id)
> 	{
> 		return vec[0];
> 	}
> 

it seems it's not possible to return references (or pointers) to 
builtin types (like double, int,...) here. Am I right?




More information about the Cplusplus-sig mailing list