std::ostrstream::rdbuf
来自 cppreference.cn
< cpp | io | ostrstream
strstreambuf* rdbuf() const; |
(C++98 起弃用) (C++26 中移除) |
|
返回一个指向关联的 std::strstreambuf 的指针,即使成员函数带有 const 限定符,也将其 constness 移除。
[编辑] 参数
(无)
[编辑] 返回值
指向关联的 std::strstreambuf 的指针,其 const 性已去除。
[编辑] 示例
运行此代码
#include <strstream> int main() { const std::ostrstream buf; std::strstreambuf* ptr = buf.rdbuf(); }