Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2006-02-19 12:13:38


On Sun, 19 Feb 2006 10:17:12 -0000, John Maddock wrote
> > How about something along the lines of:
> >
> > bcp boost/shared_ptr.hpp --exclude=quick_allocator.hpp
> >
> > Or:
> >
> > #ifdef BOOST_SP_USE_QUICK_ALLOCATOR
> >
> > //@bcp optional "quick_allocator is only used if explicitly requested"
> > #include <boost/detail/quick_allocator.hpp>
> >
> > #endif
> >
> > which would then inform the user that an optional dependency wasn't
> > being followed (if this is the default):
> >
> > bcp: an optional dependency isn't included in the subset because
> >
> > `quick_allocator is only used if explicitly requested'
> >
> > bcp: use `bcp boost/shared_ptr.hpp
> > boost/detail/quick_allocator.hpp' to include it
> >
> > The advantage is that we don't have to decide whether to follow a
> > particular dependency, the choice can be left to the person running
> > bcp.
>
> I like it, shouldn't be too hard to add either.....

As you've already shown...

Is 'optional' a 'fixed tag' or can we use it to slice and dice things? For
example, suppose we wanted to create a boost-wide 'with[out]_serialization'
capability. Could we do this?

//@bcp with_serialization "serialization support for date-time is optional"
#include #include "boost/serialization/split_free.hpp"

There a bunch of boost libraries that would benefit from this type of optional
flagging. For date-time it turns out that the --exclude=xyz.hpp capability
could also serve the same purpose.

Another possible idea. What if we created a new convention: <libname>_bcp.cfg
that could be put in the library header directory. Then the library author
could directly express the options using some trivial syntax of our own
invention that would feed bcp and thus trivialize the command line for users.
 This syntax would be something like:

option option_name option_description bcp_command_parameters

option serialization "Provides support for serialization" --exclude
date_time/gregorian/greg_serialize.hpp --exclude
date_time/posix_time/time_serialize.hpp

or even better:

option serialization "Provides support for serialization"
--exclude_library_depend serialization --exclude_library_depend archive

Anyway, just some wild ideas ;-)

Jeff


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