Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2004-05-03 10:15:17

"David Abrahams" <dave_at_[hidden]> wrote

> > The provided example shows what registration needs to be done to
> > the type of a lambda functor:
> >
> Where would that line go, in a header file?
> > BOOST_TYPEOF_REGISTER_TEMPLATE(lambda_functor, 1);
> > ....
> > BOOST_TYPEOF_REGISTER_TYPE(placeholder<2>);
> >
> Where would that line go, in a source file? If so, that sounds
> error-prone to me.

Everything would go into one file -- source or header.

The BEGIN_REGISTRATION establishes a unique REGISTRATION_GROUP (using the
counter suggested by Paul Mensonides). The REGISTRATION_GROUP is then used
by the registration macros in conjunction with __LINE__ to generate unique
integer identifiers. The END_REGISTRATION is technicaly not necessary. It
just undefs the REGISTRATION_GROUP to force other files use the
BEGIN_REGISTRATION (and so avoid potential clashes).


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