-
Notifications
You must be signed in to change notification settings - Fork 1.4k
C++11 example using deprecated <strstream> replace with <sstream>? #1725
Copy link
Copy link
Open
Description
is deprecated in C++98 and removed in C++26 (see P2867R1).
- https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2867r1.html
- https://en.cppreference.com/w/cpp/header/strstream.html
In file included from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/16.0.1/backward/strstream:50,
from ../../../../asio/src/examples/cpp11/porthopper/protocol.hpp:19,
from ../../../../asio/src/examples/cpp11/porthopper/client.cpp:19:
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/16.0.1/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]
32 | #warning \
| ^~~~~~~
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp: In member function 'short unsigned int control_request::old_port() const':
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp:56:24: warning: 'istrstream' is deprecated: use 'std::istringstream' instead [-Wdeprecated-declarations]
56 | std::istrstream is(data_, encoded_port_size);
| ^~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/16.0.1/backward/strstream:166:9: note: declared here
166 | class istrstream : public basic_istream<char>
| ^~~~~~~~~~
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp: In member function 'short unsigned int control_request::new_port() const':
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp:65:24: warning: 'istrstream' is deprecated: use 'std::istringstream' instead [-Wdeprecated-declarations]
65 | std::istrstream is(data_ + encoded_port_size, encoded_port_size);
| ^~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/16.0.1/backward/strstream:166:9: note: declared here
166 | class istrstream : public basic_istream<char>
| ^~~~~~~~~~
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp: In constructor 'control_request::control_request(short unsigned int, short unsigned int)':
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp:84:24: warning: 'ostrstream' is deprecated: use 'std::ostringstream' instead [-Wdeprecated-declarations]
84 | std::ostrstream os(data_, control_request_size);
| ^~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/16.0.1/backward/strstream:191:9: note: declared here
191 | class ostrstream : public basic_ostream<char>
| ^~~~~~~~~~
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp: In constructor 'frame::frame(long unsigned int, const std::string&)':
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp:115:24: warning: 'ostrstream' is deprecated: use 'std::ostringstream' instead [-Wdeprecated-declarations]
115 | std::ostrstream os(data_, frame_size);
| ^~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/16.0.1/backward/strstream:191:9: note: declared here
191 | class ostrstream : public basic_ostream<char>
| ^~~~~~~~~~
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp: In member function 'long unsigned int frame::number() const':
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp:124:24: warning: 'istrstream' is deprecated: use 'std::istringstream' instead [-Wdeprecated-declarations]
124 | std::istrstream is(data_, encoded_number_size);
| ^~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/16.0.1/backward/strstream:166:9: note: declared here
166 | class istrstream : public basic_istream<char>
| ^~~~~~~~~~
In file included from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/16.0.1/backward/strstream:50,
from ../../../../asio/src/examples/cpp11/porthopper/protocol.hpp:19,
from ../../../../asio/src/examples/cpp11/porthopper/server.cpp:19:
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/16.0.1/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]
32 | #warning \
| ^~~~~~~
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp: In member function 'short unsigned int control_request::old_port() const':
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp:56:24: warning: 'istrstream' is deprecated: use 'std::istringstream' instead [-Wdeprecated-declarations]
56 | std::istrstream is(data_, encoded_port_size);
| ^~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/16.0.1/backward/strstream:166:9: note: declared here
166 | class istrstream : public basic_istream<char>
| ^~~~~~~~~~
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp: In member function 'short unsigned int control_request::new_port() const':
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp:65:24: warning: 'istrstream' is deprecated: use 'std::istringstream' instead [-Wdeprecated-declarations]
65 | std::istrstream is(data_ + encoded_port_size, encoded_port_size);
| ^~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/16.0.1/backward/strstream:166:9: note: declared here
166 | class istrstream : public basic_istream<char>
| ^~~~~~~~~~
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp: In constructor 'control_request::control_request(short unsigned int, short unsigned int)':
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp:84:24: warning: 'ostrstream' is deprecated: use 'std::ostringstream' instead [-Wdeprecated-declarations]
84 | std::ostrstream os(data_, control_request_size);
| ^~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/16.0.1/backward/strstream:191:9: note: declared here
191 | class ostrstream : public basic_ostream<char>
| ^~~~~~~~~~
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp: In constructor 'frame::frame(long unsigned int, const std::string&)':
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp:115:24: warning: 'ostrstream' is deprecated: use 'std::ostringstream' instead [-Wdeprecated-declarations]
115 | std::ostrstream os(data_, frame_size);
| ^~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/16.0.1/backward/strstream:191:9: note: declared here
191 | class ostrstream : public basic_ostream<char>
| ^~~~~~~~~~
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp: In member function 'long unsigned int frame::number() const':
../../../../asio/src/examples/cpp11/porthopper/protocol.hpp:124:24: warning: 'istrstream' is deprecated: use 'std::istringstream' instead [-Wdeprecated-declarations]
124 | std::istrstream is(data_, encoded_number_size);
| ^~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/16.0.1/backward/strstream:166:9: note: declared here
166 | class istrstream : public basic_istream<char>
| ^~~~~~~~~~Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels