-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Joel Falcou Sent: 08 April 2009 12:57 To: boost-users@lists.boost.org Subject: Re: [Boost-users] different member function signatures based on class template arguments
Hicham Mouline a écrit :
So I am concerned about process(xbegin, xend, x, const S& s) // then access s.d1 and s.d2 as I measured it is slower than process(xbegin, xend, x, double d1, double d2)
How did you performed your benchmark ? Most modern compiler should produce similar code for those two interface. Are you sure you pass your structure by reference ? How large is your sample measures ?
I tried something along these lines: http://codepad.org/ieS3W2aO but it failed to compile... Shouldn't the enable_if metafct remove the invalid functions from the overload set? Regards,