BZDEV: Functors as member functions?

From: Garth_Dickie@avid.com
Date: Fri Aug 20 1999 - 13:15:38 EST


Hi,

I've just moved some functions which were declared with BZ_DECLARE_FUNCTION
inside of a class, as static member functions. This works, and gives me some
protection from namespace problems. However because the template wrapper
function
generated by BZ_DECLARE_ARRAY_ET_UOP is not static and not const, I get warnings
about calling a non-const member function from inside a const member function
when I
go to use a Blitz++ expression.

I've solved this minor problem by creating a parallel set of macros,
BZ_DECLARE_STATIC_FUNCTION,
etc, which put a 'static' keyword in front of the generated function.

What I would *really* like to do, however, is use non-static member functions. I
am not clear
on how I could propagate a class object down into _bz_ArrayExpr< >, though. Is
there any way
to hack this by messing with the _impl class, or is something more fundamental
needed?

Regards,
Garth A. Dickie

--------------------- blitz-dev list --------------------------------
* To subscribe/unsubscribe: use the handy web form at
http://oonumerics.org/blitz/lists.html



This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 04:30:10 EST