
David Abrahams wrote:
If we want to go that way, we're going to need standard prefix and postfix headers that we #include in every Boost header:
#ifndef INCLUDE-GUARD # define INCLUDE-GUARD # include <boost/config/prefix.hpp>
...your code here
# include <boost/config/postfix.hpp> #endif // INCLUDE-GUARD
Otherwise it will be totally unmaintainable.
That is what I was suggesting elsewhere in this thread and which I raised some time ago w.r.t. warnings in general (not just the deprecated APIs). The feeling from that is to provide a guide to handling these warnings and try to fix them in the code where possible without using #pragmas. The deprecated APIs are an independant issue, primarily because they enforce their policy by default and that they impact the standard library APIs. Personally I agree that having the compiler/library deprecating standard library APIs *by default* is a bad thing. Therefore, the deprecation prevention macro should go in Boost.Config (possibly with a *deprecate the APIs* macro to control this so you can turn it on if you want the deprecation checks). One potential problem with this is if the user has: #include <string> // deprecation turned on #include <boost/lexical_cast.hpp> // disabling deprecation has no effect // ... - Reece