Boost logo

Boost Users :

Subject: Re: [Boost-users] [GIL] Performance warning...
From: Agustín K-ballo Bergé (kaballo86_at_[hidden])
Date: 2009-11-27 19:25:23


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 list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net