Boost logo

Boost :

From: Jason Shirk (jasonsh_at_[hidden])
Date: 2002-07-19 14:41:29


"David Abrahams" <david.abrahams_at_[hidden]> wrote in message
news:<0e0801c22f41$1a8b4630$6501a8c0_at_[hidden]>...
>
> From: "Douglas Gregor" <gregod_at_[hidden]>
>
>
> > 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 {
> > deprecated_boost_function_syntax()
> > {
> > std::cerr << "Warning: using deprecated Boost.Function syntax"
> > << std::endl;
> > // yada yada yada
> > }
> > };
>
> No thanks.
>
> How about inducing an unused variable warning?
> It's not reliable, but at least those who care will hear about it.
>
> -Dave
>

FWIW, VC7 and later support __declspec(deprecated) for just this
purpose.

Jason Shirk
VC++ Compiler Team


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk