Boost logo

Boost Users :

Subject: Re: [Boost-users] different member function signatures based on class template arguments
From: Hicham Mouline (hicham_at_[hidden])
Date: 2009-04-08 09:04:07


> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Joel Falcou
> Sent: 08 April 2009 12:57
> To: boost-users_at_[hidden]
> 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 used g++4.1 -O3 and to be honest, the test was a few months back, I just
remembered it.
I'll try again now...

The question remains: isn't there a way to have more than 1 argument?

Also, how do I treat the case of no extra argument at all?

Regards,


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