
Hi guys, I'll look into the call_traits metafunction tomorrow. I can
also write a simple test that would measure potential overhead.
Thanks for the input!
Christian
2009/11/27 Agustín K-ballo Bergé
Lubomir Bourdev escribió:
While some channel types are classes, a built-in type such as ‘unsigned char’ is a valid channel. We have to be careful so we don’t slow down operations on common 8-bit images. I think it is safe to replace “Channel” with “const Channel” but “const Channel&” has a size of a pointer and this is far bigger than unsigned char.
Perhaps to do this right one needs to create a metafunction that returns the type by value or by const reference, whichever is faster.
Lubomir
call_traits< T >::param_type does that.
"Defines a type that represents the "best" way to pass a parameter of type T to a function." http://www.boost.org/doc/libs/1_41_0/libs/utility/call_traits.htm
Agustín K-ballo Bergé.- http://talesofcpp.blogspot.com _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users