On Fri, 9 Oct 2020 at 15:13, Joel Sherrill <j...@rtems.org> wrote:
>
>
>
> On Fri, Oct 9, 2020 at 8:49 AM Jonathan Wakely <jwakely....@gmail.com> wrote:
>>
>> 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].
>
>
> Apparently the PDF file is huge and was taking forever to load and that's
> why my search for "strstr" didn't turn up anything.
>
> I'm asking because this came up in a discussion of whether the FACE
> Technical Standard for avionics should consider forbidding its use
> as deprecated. It sounds like we are years away from it disappearing
> and avionics applications do not use the latest C++ versions anyway.
>
> In your opinion, would using this be a risk for use in a long-lived 
> application?
std::ostrstream should never be used anyway IMHO. It's too hard to use
correctly.

std::istrstream is safe, but might finally be on its way out if
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0448r2.pdf
makes progress for C++23.

Or maybe istrstream should be undeprecated (maybe after removing ostrstream).

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2139r0.html#3.12
touches on what should happen to them.

Reply via email to