std::ostrstream::rdbuf(3)
π NAME π
okay so this page is literally about std::ostrstream::rdbuf β yes bestie, the std::ostrstream::rdbuf function itself, from the C++ Standard Libary manual. iconic behavior only. β¨
β¨ Synopsis β¨
here's the signature, and the lore is loud: it's deprecated in C++98 and removed in C++26. not me mourning legacy C++ ππ
strstreambuf* rdbuf() const; (deprecated in C++98)
(removed in C++26)
Returns a pointer to the associated std::strstreambuf, casting away its constness (despite the const qualifier on the member function). periodt. π
π Parameters π
(none) β literally nothing to pass, bestie. no arguments, no stress. π«Ά
πΈ Return value πΈ
Pointer to the associated std::strstreambuf, with constness cast away. that's the whole tea. β¨
π¦ Example π¦
okay so here's the demo, copied exactly because we do not mess with code:
// Run this code
#include <strstream>
int main()
{
const std::ostrstream buf;
std::strstreambuf* ptr = buf.rdbuf();
}
mwah π this one came from source cppreference.com, dated 2024.06.10 β k byeee, stay slay ππ
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms