Files
hustoj/web/cppreference-zh/chmhelp/cpp-io-basic_ostringstream-operator=.html
2025-08-01 12:57:54 +08:00

92 lines
4.8 KiB
HTML

<!DOCTYPE html>
<html lang="zh" dir="ltr" class="client-nojs" xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh">
<head><meta http-equiv="x-ua-compatible" content="ie=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>std::basic_ostringstream::operator=</title>
<link rel="stylesheet" href="ext.css" />
<link rel="stylesheet" href="site_modules.css" />
</head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-cpp_io_basic_ostringstream_operator skin-cppreference2 action-view cpp-navbar">
<div id="cpp-content-base">
<div id="content"><a id="top"></a>
<h1 id="firstHeading" class="firstHeading"><span style="font-size:0.7em; line-height:130%">std::basic_ostringstream::</span>operator=</h1>
<div id="bodyContent">
<div id="contentSub"><span class="subpages">&lt; <a href="cpp.html">cpp</a>&lrm; | <a href="cpp-io.html">io</a>&lrm; | <a href="cpp-io-basic_ostringstream.html">basic ostringstream</a></span></div>
<div id="mw-content-text" lang="zh" dir="ltr" class="mw-content-ltr" xml:lang="zh">
<table class="t-dcl-begin">
<tbody>
<tr class="t-dcl t-since-cxx11">
<td>
<div><span class="mw-geshi cpp source-cpp">basic_ostringstream<span class="sy3">&amp;</span> operator<span class="sy1">=</span><span class="br0">(</span> basic_ostringstream<span class="sy3">&amp;&amp;</span> other <span class="br0">)</span><span class="sy4">;</span></span></div>
</td>
<td class="t-dcl-nopad"></td>
<td><span class="t-mark-rev t-since-cxx11">(C++11 &#36215;)</span></td>
</tr>
<tr class="t-dcl-sep">
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>&#31227;&#21160;&#36171;&#20540;&#23383;&#31526;&#20018;&#27969; <code>other</code> &#32473; <code>*this</code> &#65292;&#31561;&#25928;&#30340;&#31227;&#21160;&#36171;&#20540; <span class="t-lc"><a href="cpp-io-basic_ostream.html">std::basic_ostream</a></span> &#22522;&#31867;&#21644;&#20851;&#32852;&#30340; <span class="t-lc"><a href="cpp-io-basic_stringbuf.html">std::basic_stringbuf</a></span> &#12290;</p>
<p>&#27880;&#24847;&#65292;&#22522;&#31867;&#31227;&#21160;&#36171;&#20540;&#20132;&#25442; <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">*</span>this</span></span> &#19982; <code>other</code> &#38388;&#30340;&#25152;&#26377;&#27969;&#29366;&#24577;&#21464;&#37327;&#65288;&#38500;&#20102; <span class="t-c"><span class="mw-geshi cpp source-cpp">rdbuf</span></span> &#65289;&#12290;</p>
<h3><span class="mw-headline" id=".E5.8F.82.E6.95.B0">&#21442;&#25968;</span></h3>
<table class="t-par-begin">
<tr class="t-par">
<td>other</td>
<td>-</td>
<td>&#31227;&#21160;&#26469;&#28304;&#30340;&#23383;&#31526;&#20018;&#27969;</td>
</tr>
</table>
<h3><span class="mw-headline" id=".E8.BF.94.E5.9B.9E.E5.80.BC">&#36820;&#22238;&#20540;</span></h3>
<p><span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">*</span>this</span></span></p>
<h3><span class="mw-headline" id=".E7.A4.BA.E4.BE.8B">&#31034;&#20363;</span></h3>
<table class="metadata plainlinks ambox mbox-small-left ambox-notice" style="">
<tr>
<td class="mbox-empty-cell"></td>
<td class="mbox-text" style="">&#26412;&#33410;&#26410;&#23436;&#25104;<br />
&#21407;&#22240;&#65306;&#26242;&#26080;&#31034;&#20363;</td>
</tr>
</table>
<h3><span class="mw-headline" id=".E5.8F.82.E9.98.85">&#21442;&#38405;</span></h3>
<table class="t-dsc-begin">
<tr class="t-dsc">
<td>
<div class="t-dsc-member-div">
<div><a href="cpp-io-basic_ostringstream-swap.html"><span class="t-lines"><span>swap</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div>
</td>
<td>&#20132;&#25442;&#20004;&#20010;&#23383;&#31526;&#20018;&#27969;<br />
<span class="t-mark">(&#20844;&#24320;&#25104;&#21592;&#20989;&#25968;)</span></td>
</tr>
<tr class="t-dsc">
<td>
<div class="t-dsc-member-div">
<div><a href="cpp-io-basic_stringbuf-operator=.html"><span class="t-lines"><span>operator=</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div>
</td>
<td>&#36171;&#20540; basic_stringbuf &#23545;&#35937;<br />
<span class="t-mark">(<code>std::basic_stringbuf&lt;CharT,Traits,Allocator&gt;</code> &#30340;&#20844;&#24320;&#25104;&#21592;&#20989;&#25968;)</span></td>
</tr>
<tr class="t-dsc">
<td>
<div class="t-dsc-member-div">
<div><a href="cpp-io-basic_ostream-operator=.html"><span class="t-lines"><span>operator=</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div>
</td>
<td>&#20174;&#21478;&#19968; <code>basic_ostream</code> &#31227;&#21160;&#36171;&#20540;<br />
<span class="t-mark">(&#21463;&#20445;&#25252;&#25104;&#21592;&#20989;&#25968;)</span></td>
</tr>
</table>
</div>
<div class="visualClear"></div>
</div>
</div>
</div>
</body>
</html>