Boost logo

Boost Users :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-07-22 12:37:23

"Christopher Baus" <christopher_at_[hidden]> wrote in message
> Ok this is bit off topic since it isn't directly related to boost,
but I
> know there are a lot C++ guru's here, and I'm sure one of you has
> addressed this.
> I am using Andrei's ScopeGuard and not boosts. I have googled, but
> haven't figured out how to turn off the "unused variable" warning in
> with out disabling all warnings. My guess is that there is no
> but I thought I would try here first.

Joaquín M López Muñoz has a version of Anrei's scope guard in his
recently accepted multi_index library. To prevent these warnings, he
adds a no-op member

     void touch() cont { }

to scope_guard_impl_base. Then, in his version of ON_BLOCK_EXIT (which
is customized for his library, and so not generally useful) expands to
something like this:

    const scope_guard_impl_base& guard = make_guard( ... );


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at