On Fri, 9 Oct 2020 at 14:31, Joel Sherrill <j...@rtems.org> wrote: > > Hi > > <strstream> being deprecated for nearly 20 years of C++ standards has > always been a bit baffling to me. I'm used to thingis being deprecated and > then removed a bit faster than that. > > It is still deprecated in C++17 but does not appear in C++2x as of > draft N4860. GCC 10 still behaves the same and you get a deprecated warning > when you use --std=c++2x. > > Am I reading the draft N4860 correctly and it is finally being removed?
No, it's still there in the same place, Annex D. See D.12 [depr.strstreambuf]. > The warning is generic for using it and it seems as though more direct > guidance could be given if it has been removed. It hasn't been. It won't be removed until a suitable replacement is added to the library, and even then implementations won't be required to remove it. We still make std::auto_ptr available despite it being removed in C++17 (after deprecation in C++11). > /home/joel/rtems-work/tools/6/lib/gcc/i386-rtems6/10.2.1/include/c++/backward/backward_warning.h:32:2: > warning: #warning This file includes at least one deprecated or antiquated > header which may be removed without further notice at a future date. Please > use a non-deprecated interface with equivalent functionality instead. For a > listing of replacement headers and interfaces, consult the file > backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp] > > I'm far from complaining about it being removed. I just want to make sure I > am interpreting the draft C++ standard correctly and see if there is a > desired to slightly improve GCC's warning to give more specific advice. The libstdc++ list would be a better place to discuss that kind of thing.