Boost logo

Boost Users :

Subject: [Boost-users] BOOST_SCOPE_EXIT doesn't detect argument types
From: Braden McDaniel (braden_at_[hidden])
Date: 2010-02-11 01:00:42


I have the following code:

        typedef std::vector<boost::intrusive_ptr<node> > children_t;
        children_t children = group.children_.value();
        â‹®
        children.push_back(*n);
        bool succeeded = false;
        BOOST_SCOPE_EXIT((&succeeded)(&children)) {
            if (!succeeded) { children.pop_back(); }
        } BOOST_SCOPE_EXIT_END

This is yielding compiler errors like this:

        193: error: ‘boost_se_params_t_193::boost_se_param_t_0_193’ is not a type
        193: error: ‘boost_se_params_t_193::boost_se_param_t_1_193’ is not a type

The block of code emitted by the preprocessor starts like this:

        typedef void (*boost_se_tag_0_193)(int &succeeded);
        typedef void (*boost_se_tag_1_193)(int &children);

… which leads me to conclude that, for some reason, BOOST_SCOPE_EXIT
isn't picking up the correct types for its arguments.

Has anyone seen this sort of thing before? Is there something I can do
to play more nicely with BOOST_SCOPE_EXIT?

-- 
Braden McDaniel <braden_at_[hidden]>

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net