Boost logo

Boost :

Subject: Re: [boost] [function] function wrappingwithnoexceptionsafetyguarantee
From: Domagoj Saric (dsaritz_at_[hidden])
Date: 2010-11-08 19:23:31


"Nevin Liber" <nevin_at_[hidden]> wrote in message
news:AANLkTi=iE8V4grniB1HgXeBJNBUG0gVyKHpGW+7wHczo_at_mail.gmail.com...
> On 6 November 2010 13:08, Emil Dotchevski <emil_at_[hidden]> wrote:
>
>> Can someone please explain why does storing the empty state take space
>> per
>> type?
>>
>
> Is it a side effect of being a header only library?

No, but because each target type requires/is invoked by different (source
and/or generated) code so it needs a different vtable that points to the
different invoker code...

e.g. different code is used to invoke a free function pointer, a bound
member function, a lambda expression, a referenced boost function etc etc...

-- 
"What Huxley teaches is that in the age of advanced technology, spiritual
devastation is more likely to come from an enemy with a smiling face than
from one whose countenance exudes suspicion and hate."
Neil Postman 

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