Boost logo

Boost :

From: Maxim Egorushkin (e-maxim_at_[hidden])
Date: 2003-09-28 08:36:31

"John Sheehan" <dumbnose_at_[hidden]> wrote in message
> I have posted the updated version to:

Have you test it?

template<typename Fun>
make_scope_guard_impl(const Fun& fun){
    return scope_guard_impl<Fun>(fun);

There is slicing. That means your scope_guard_impl<> destructor is called while leaving the make_scope_guard_impl function and you get a useless copy of the scope_guard_base subobject.

Boost list run by bdawes at, gregod at, cpdaniel at, john at