<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[C++0x und tuple: iostream-Manipulation?]]></title><description><![CDATA[<p>Hoi,</p>
<p>boost::tuple erlaubt ja das Manipulieren von outstreams in etwa so:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;iomanip&gt;

#include &lt;boost/tuple/tuple.hpp&gt;
#include &lt;boost/tuple/tuple_io.hpp&gt;
...
using namespace boost;

boost::tuple&lt;double, double&gt; my_tuple(3.14159;2.7182);

std::ofstream outfile((&quot;foo.txt&quot;).c_str());

outfile &lt;&lt; boost::tuples::set_open('[') &lt;&lt; boost::tuples::set_close(']')
        &lt;&lt; boost::tuples::set_delimiter(',') &lt;&lt; std::setw(15)
        &lt;&lt; std::setprecision(2)
        &lt;&lt; my_tuple;
</code></pre>
<p>Ggf. fehlerhaft, habe ich jetzt nicht gecheckt, aber ich hoffe es ist klar, wenn ich frage: Kann man in c++0x eine vergleichbare Streamformatierung unternehmen? Ich habe bislang keine aussagekräftige Dokumentation gefunden.</p>
<p>Gruß,<br />
Christian</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/292043/c-0x-und-tuple-iostream-manipulation</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 08:18:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/292043.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 01 Sep 2011 16:20:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to C++0x und tuple: iostream-Manipulation? on Thu, 01 Sep 2011 16:20:13 GMT]]></title><description><![CDATA[<p>Hoi,</p>
<p>boost::tuple erlaubt ja das Manipulieren von outstreams in etwa so:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;iomanip&gt;

#include &lt;boost/tuple/tuple.hpp&gt;
#include &lt;boost/tuple/tuple_io.hpp&gt;
...
using namespace boost;

boost::tuple&lt;double, double&gt; my_tuple(3.14159;2.7182);

std::ofstream outfile((&quot;foo.txt&quot;).c_str());

outfile &lt;&lt; boost::tuples::set_open('[') &lt;&lt; boost::tuples::set_close(']')
        &lt;&lt; boost::tuples::set_delimiter(',') &lt;&lt; std::setw(15)
        &lt;&lt; std::setprecision(2)
        &lt;&lt; my_tuple;
</code></pre>
<p>Ggf. fehlerhaft, habe ich jetzt nicht gecheckt, aber ich hoffe es ist klar, wenn ich frage: Kann man in c++0x eine vergleichbare Streamformatierung unternehmen? Ich habe bislang keine aussagekräftige Dokumentation gefunden.</p>
<p>Gruß,<br />
Christian</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2113511</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2113511</guid><dc:creator><![CDATA[CMB]]></dc:creator><pubDate>Thu, 01 Sep 2011 16:20:13 GMT</pubDate></item></channel></rss>