Boost logo

Boost :

Subject: Re: [boost] [function] The cost of boost::function
From: Julien Nitard (julien.nitard_at_[hidden])
Date: 2012-04-16 18:34:17


Hi,

...

> I have learned that personally I shall never use boost::function. You
> probably may want to investigate such a code bloat. Though it is probably
> the known and expected behavior.
> And I do agree that CCCC is not quite relevant here. Just for information.
>
> --
> Michael Kochetkov
>
> P.S. The traditional full story for AAAA, that includes intermediate calls.
> Though it is not really full -- I have given up for three more calls inside
> the boost::function1<int,int>::operator() function.


I guess the cost of boost::function (or std::function) is more than
justified for its use. It is not intended to be used everywhere,
(templates would be prefered where performance matters) but is the
only way to abstract what a function is and abstract its type.

Unless, you have a better way to achieve the effect, I feel your
criticism is rather unfair.

Julien


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk