Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-07-19 11:09:37

On Friday 19 July 2002 11:44 am, David Abrahams wrote:
> > Maybe version the old boost::function code (e.g., stick it in
> > boost::deprecated and supply an import library), and provide a completely
> new
> > version based on this syntax?
> If we could find a way to provide a warning for uses of the deprecated
> syntax as a transition plan, that would be ideal.

I haven't seen any easy way to emit a warning at compile-time, but we could
guarantee to annoy the user at run-time if they use the deprecated syntax,
like this:

struct deprecated_boost_function_syntax {
    std::cerr << "Warning: using deprecated Boost.Function syntax"
              << std::endl;
    // yada yada yada

Then when the deprecated syntax is used, just create a static
deprecated_boost_function_syntax object that is guaranteed to annoy you at
program initialization :)

For this we'd probably want several levels of deprecation handling:
  1) Don't allow deprecated syntax
  2) Allow deprecated syntax, but warn about it (default?)
  3) Allow deprecated syntax, don't warn (a.k.a. living in the past)

> > Might need to figure out how to get this working on MSVC first :(
> "Might?"
> You've been around longer than that, haven't you?
> ;-)
> -Dave

*grumble* *grumble*


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