Boost logo

Boost :

From: Hans Larsen (hans_at_[hidden])
Date: 2007-04-06 16:18:48


Alexander, can you upload your last solution to the vault (or send it
directly to me) once it works? :)

Hans

On 6-Apr-07, at 4:16 PM, Alexander Nasonov wrote:

> Andrey Semashev wrote:
>> For me the performance is of high concern. I expect the
>> BOOST_SCOPE_EXIT performance to be comparable to a hand-written scope
>> guard like that:
>>
>> struct guard
>> {
>> ~guard()
>> {
>> // guard body
>> }
>> };
>
> My last solution wraps scope-exit-block into a function, take an
> address of this function and calls it indirectly. I don't know (yet)
> if any compiler is able to optimize this call away, though.
>
>> Another thing I expect is the guard's construction error safety. I.e.
>> it may not involve things like dynamic memory allocations, TLS slot
>> acquirement, etc., and should minimize copying of any user's objects.
> It's very lightweight.
>
> --
> Alexander Nasonov
> http://nasonov.blogspot.com
>
> When you are arguing against Him you are arguing against the very
> power that makes you able to argue at all. -- C.S. Lewis --
>
> This quote is generated by:
> /usr/pkg/bin/curl -L http://tinyurl.com/veusy \
> | sed -e 's/^document\.write(.//' -e 's/.);$/ --/' \
> -e 's/<[^>]*>//g' -e 's/^More quotes from //' \
> | fmt | tee ~/.signature-quote
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/
> listinfo.cgi/boost


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