How can I deprecate a C++ header?
Here is a possible (albeit perhaps not too elegant) solution. Insert in the header a code like that // badheader.hpp namespace { [[deprecated(“This header is deprecated”)]] constexpr static int badheader_hpp_is_deprecated = 0; constexpr static int please_dont_use_badheader_hpp = badheader_hpp_is_deprecated; } This creates a deprecated variable badheader_hpp_is_deprecated. The initialization of please_dont_use_badheader_hpp triggers the deprecated warning. Notice that … Read more