Topic: I propose to add the ability to output containers


Author: reactor.game@gmail.com
Date: Sun, 16 Sep 2018 05:06:25 -0700 (PDT)
Raw View
------=_Part_1363_73956491.1537099585272
Content-Type: multipart/alternative;
 boundary="----=_Part_1364_921763215.1537099585273"

------=_Part_1364_921763215.1537099585273
Content-Type: text/plain; charset="UTF-8"

I propose to add the ability to output containers using stream.

Example:

std::vector<std::string> strings = {"Hello", "cout!"};

cout << strings << endl;


Result in console:
{"Hello", "cout!"}

And out in file:

std::vector<std::string> strings = {"Hello", "ofstream!"};
std::ofstream of("text.txt");
if (of.is_open()){
    of << strings;
    of.close();
}


In file:
{"Hello", "ofstream!"}

For user classes need overload - operator<<

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/af104866-bfcb-4b2f-a6fa-ffeb829cf1cf%40isocpp.org.

------=_Part_1364_921763215.1537099585273
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I propose to add the ability to output containers using st=
ream.<div><br></div><div>Example:</div><div><div class=3D"prettyprint" styl=
e=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187)=
; border-style: solid; border-width: 1px; overflow-wrap: break-word;"><code=
 class=3D"prettyprint"><div class=3D"subprettyprint"><pre><span style=3D" c=
olor:#66d9ef;"><span style=3D"color: #000;" class=3D"styled-by-prettify">st=
d</span></span><span style=3D"color: #660;" class=3D"styled-by-prettify">::=
</span><span style=3D" color:#66d9ef;"><span style=3D"color: #000;" class=
=3D"styled-by-prettify">vector</span></span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">&lt;</span><span style=3D" color:#66d9ef;"><span=
 style=3D"color: #000;" class=3D"styled-by-prettify">std</span></span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=
=3D" color:#66d9ef;"><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">string</span></span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">&gt;</span><span style=3D" color:#3e3d32;"><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> </span></span><span style=3D" color:#e48d=
27;"><span style=3D"color: #000;" class=3D"styled-by-prettify">strings</spa=
n></span><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span></span><span style=3D" color:#e6e5e2;"><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span></span><spa=
n style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> </span></span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">{</span><span style=3D" color:#e6db74;"><span style=3D"color: #080=
;" class=3D"styled-by-prettify">&quot;Hello&quot;</span></span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D" colo=
r:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </sp=
an></span><span style=3D" color:#e6db74;"><span style=3D"color: #080;" clas=
s=3D"styled-by-prettify">&quot;cout!&quot;</span></span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">};</span></pre><pre><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify">cout</span><span style=3D" color:=
#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
></span><span style=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=
=3D"styled-by-prettify">&lt;&lt;</span></span><span style=3D" color:#3e3d32=
;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span=
><span style=3D"color: #000;" class=3D"styled-by-prettify">strings</span><s=
pan style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span></span><span style=3D" color:#e6e5e2;"><span style=3D"=
color: #660;" class=3D"styled-by-prettify">&lt;&lt;</span></span><span styl=
e=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span></span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y">endl</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</=
span></pre></div></code></div><br></div><div>Result in console:=C2=A0</div>=
<div><div class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 25=
0); border-color: rgb(187, 187, 187); border-style: solid; border-width: 1p=
x; overflow-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"su=
bprettyprint"><font color=3D"#666600"><span style=3D"color: #660;" class=3D=
"styled-by-prettify">{</span><span style=3D"color: #080;" class=3D"styled-b=
y-prettify">&quot;Hello&quot;</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #080;" class=3D"styled-by-prettify"=
>&quot;cout!&quot;</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">}</span></font></div></code></div><br>And out in file:</div><div><d=
iv class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); bor=
der-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; over=
flow-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subpretty=
print"><pre><span style=3D"color: rgb(102, 217, 239);"><span style=3D"color=
: #000;" class=3D"styled-by-prettify">std</span></span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">::</span><span style=3D"color: rgb(10=
2, 217, 239);"><span style=3D"color: #000;" class=3D"styled-by-prettify">ve=
ctor</span></span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>&lt;</span><span style=3D"color: rgb(102, 217, 239);"><span style=3D"color=
: #000;" class=3D"styled-by-prettify">std</span></span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">::</span><span style=3D"color: rgb(10=
2, 217, 239);"><span style=3D"color: #008;" class=3D"styled-by-prettify">st=
ring</span></span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>&gt;</span><span style=3D"color: rgb(62, 61, 50);"><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> </span></span><span style=3D"color: rgb=
(228, 141, 39);"><span style=3D"color: #000;" class=3D"styled-by-prettify">=
strings</span></span><span style=3D"color: rgb(62, 61, 50);"><span style=3D=
"color: #000;" class=3D"styled-by-prettify"> </span></span><span style=3D"c=
olor: rgb(230, 229, 226);"><span style=3D"color: #660;" class=3D"styled-by-=
prettify">=3D</span></span><span style=3D"color: rgb(62, 61, 50);"><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"colo=
r: rgb(230, 219, 116);"><span style=3D"color: #080;" class=3D"styled-by-pre=
ttify">&quot;Hello&quot;</span></span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">,</span><span style=3D"color: rgb(62, 61, 50);"><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span st=
yle=3D"color: rgb(230, 219, 116);"><span style=3D"color: #080;" class=3D"st=
yled-by-prettify">&quot;ofstream!&quot;</span></span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">};</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"><br>std</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">::</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify">ofstream of</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">(</span><span style=3D"color: #080;" class=3D"styled-by-p=
rettify">&quot;text.txt&quot;</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">);</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"><br></span><span style=3D"color: #008;" class=3D"styled-by-prett=
ify">if</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify">of</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify">is_open</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">()){</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 of </span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">&lt;&lt;</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> strings</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><font color=3D"#666600"=
><span style=3D"color: #000;" class=3D"styled-by-prettify">of</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify">close</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">();</span></font><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">}</span></pre></div></code></div><br>In file=
:</div><div><div class=3D"prettyprint" style=3D"background-color: rgb(250, =
250, 250); border-color: rgb(187, 187, 187); border-style: solid; border-wi=
dth: 1px; overflow-wrap: break-word;"><code class=3D"prettyprint"><div clas=
s=3D"subprettyprint"><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">{</span><span style=3D"color: #080;" class=3D"styled-by-prettify">&quot=
;Hello&quot;</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #080;" class=3D"styled-by-prettify">&quot;ofstream!&=
quot;</span><span style=3D"color: #660;" class=3D"styled-by-prettify">}</sp=
an></div></code></div><br>For user classes need overload - operator&lt;&lt;=
</div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/af104866-bfcb-4b2f-a6fa-ffeb829cf1cf%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/af104866-bfcb-4b2f-a6fa-ffeb829cf1cf=
%40isocpp.org</a>.<br />

------=_Part_1364_921763215.1537099585273--

------=_Part_1363_73956491.1537099585272--

.


Author: reactor.game@gmail.com
Date: Sun, 16 Sep 2018 05:25:47 -0700 (PDT)
Raw View
------=_Part_1328_380184210.1537100748083
Content-Type: multipart/alternative;
 boundary="----=_Part_1329_1508260805.1537100748084"

------=_Part_1329_1508260805.1537100748084
Content-Type: text/plain; charset="UTF-8"

Or add in STL function for out:
Warning not a beautiful code =):

template<typename Iterator_t>


void print_container(Iterator_t begin, Iterator_t end, std::ostream& os){

    os << '{';

    while (begin < end-1){

        os << *begin << ',';

        ++begin;

    }

    os << *begin;

    os << '}';

}


Use example:

vector<string> words = {"eSkry", "Cat", "Dog", "Human"};

print_container(words.begin(), words.end(), cout); // Out in cout

ofstream of("text.txt");

if (of.is_open()){

    print_container(words.begin(), words.end(), of); /* Out in file */

    of.close();

}



--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/95d54f1e-0e75-4a6d-aea4-902f2b3865e0%40isocpp.org.

------=_Part_1329_1508260805.1537100748084
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Or add in STL function for out:</div><div>Warning not=
 a beautiful code =3D):</div><div><div class=3D"prettyprint" style=3D"backg=
round-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-s=
tyle: solid; border-width: 1px; overflow-wrap: break-word;"><code class=3D"=
prettyprint"><div class=3D"subprettyprint"><pre><span style=3D" color:#f926=
72;"><span style=3D"color: #008;" class=3D"styled-by-prettify">template</sp=
an></span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</s=
pan><span style=3D" color:#f92672;"><span style=3D"color: #008;" class=3D"s=
tyled-by-prettify">typename</span></span><span style=3D" color:#3e3d32;"><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><spa=
n style=3D" color:#66d9ef;"><span style=3D"color: #606;" class=3D"styled-by=
-prettify">Iterator_t</span></span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">&gt;</span></pre><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"><br></span><pre><span style=3D" font-style:italic; color:=
#66d9ef;"><span style=3D"color: #008;" class=3D"styled-by-prettify">void</s=
pan></span><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> </span></span><span style=3D" font-weight:600; c=
olor:#a6e22e;"><span style=3D"color: #000;" class=3D"styled-by-prettify">pr=
int_container</span></span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">(</span><span style=3D" color:#66d9ef;"><span style=3D"color: #60=
6;" class=3D"styled-by-prettify">Iterator_t</span></span><span style=3D" co=
lor:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </=
span></span><span style=3D" color:#e48d27;"><span style=3D"color: #008;" cl=
ass=3D"styled-by-prettify">begin</span></span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">,</span><span style=3D" color:#3e3d32;"><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span st=
yle=3D" color:#66d9ef;"><span style=3D"color: #606;" class=3D"styled-by-pre=
ttify">Iterator_t</span></span><span style=3D" color:#3e3d32;"><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span style=
=3D" color:#e48d27;"><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">end</span></span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">,</span><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span></span><span style=3D" color:#66d9ef;"><=
span style=3D"color: #000;" class=3D"styled-by-prettify">std</span></span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span sty=
le=3D" color:#66d9ef;"><span style=3D"color: #000;" class=3D"styled-by-pret=
tify">ostream</span></span><span style=3D" color:#e6e5e2;"><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">&amp;</span></span><span style=3D=
" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> </span></span><span style=3D" color:#e48d27;"><span style=3D"color: #000;=
" class=3D"styled-by-prettify">os</span></span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">){</span></pre><pre><span style=3D" color:#3e=
3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> =C2=A0 =
=C2=A0</span></span><span style=3D" color:#e48d27;"><span style=3D"color: #=
000;" class=3D"styled-by-prettify">os</span></span><span style=3D" color:#3=
e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
/span><span style=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D=
"styled-by-prettify">&lt;&lt;</span></span><span style=3D" color:#3e3d32;">=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><s=
pan style=3D" color:#e6db74;"><span style=3D"color: #080;" class=3D"styled-=
by-prettify">&#39;{&#39;</span></span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">;</span></pre><pre><span style=3D" color:#3e3d32;"><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0</span=
></span><span style=3D" color:#f92672;"><span style=3D"color: #008;" class=
=3D"styled-by-prettify">while</span></span><span style=3D" color:#3e3d32;">=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=
=3D" color:#e48d27;"><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">begin</span></span><span style=3D" color:#3e3d32;"><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span></span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">&lt;</span><span style=3D" color:#3e3d3=
2;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></spa=
n><span style=3D" color:#e48d27;"><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">end</span></span><span style=3D" color:#e6e5e2;"><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">-</span></span><span style=
=3D" color:#ae81ff;"><span style=3D"color: #066;" class=3D"styled-by-pretti=
fy">1</span></span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">){</span></pre><pre><span style=3D" color:#3e3d32;"><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0 =C2=A0 =C2=A0</span></s=
pan><span style=3D" color:#e48d27;"><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify">os</span></span><span style=3D" color:#3e3d32;"><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span styl=
e=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">&lt;&lt;</span></span><span style=3D" color:#3e3d32;"><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span></span><span style=3D" co=
lor:#e6e5e2;"><span style=3D"color: #660;" class=3D"styled-by-prettify">*</=
span></span><span style=3D" color:#e48d27;"><span style=3D"color: #008;" cl=
ass=3D"styled-by-prettify">begin</span></span><span style=3D" color:#3e3d32=
;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span=
><span style=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">&lt;&lt;</span></span><span style=3D" color:#3e3d32;"><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span s=
tyle=3D" color:#e6db74;"><span style=3D"color: #080;" class=3D"styled-by-pr=
ettify">&#39;,&#39;</span></span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">;</span></pre><pre><span style=3D" color:#3e3d32;"><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0 =C2=A0 =C2=
=A0</span></span><span style=3D" color:#e6e5e2;"><span style=3D"color: #660=
;" class=3D"styled-by-prettify">++</span></span><span style=3D" color:#e48d=
27;"><span style=3D"color: #008;" class=3D"styled-by-prettify">begin</span>=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span></=
pre><pre><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> =C2=A0 =C2=A0</span></span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">}</span></pre><pre><span style=3D" color=
:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> =C2=
=A0 =C2=A0</span></span><span style=3D" color:#e48d27;"><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify">os</span></span><span style=3D" colo=
r:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </sp=
an></span><span style=3D" color:#e6e5e2;"><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">&lt;&lt;</span></span><span style=3D" color:#3e3d3=
2;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></spa=
n><span style=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">*</span></span><span style=3D" color:#e48d27;"><span style=
=3D"color: #008;" class=3D"styled-by-prettify">begin</span></span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">;</span></pre><pre><span s=
tyle=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> =C2=A0 =C2=A0</span></span><span style=3D" color:#e48d27;"><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify">os</span></span><span st=
yle=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> </span></span><span style=3D" color:#e6e5e2;"><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">&lt;&lt;</span></span><span style=3D" =
color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span></span><span style=3D" color:#e6db74;"><span style=3D"color: #080;" =
class=3D"styled-by-prettify">&#39;}&#39;</span></span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">;</span></pre><pre><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">}</span></pre></div></code></div><br=
>Use example:<br><br><div class=3D"prettyprint" style=3D"background-color: =
rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; =
border-width: 1px; overflow-wrap: break-word;"><code class=3D"prettyprint">=
<div class=3D"subprettyprint"><pre><span style=3D" color:#66d9ef;"><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify">vector</span></span><span=
 style=3D"color: #080;" class=3D"styled-by-prettify">&lt;</span><span style=
=3D" color:#66d9ef;"><span style=3D"color: #080;" class=3D"styled-by-pretti=
fy">string</span></span><span style=3D"color: #080;" class=3D"styled-by-pre=
ttify">&gt;</span><span style=3D" color:#3e3d32;"><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> </span></span><span style=3D" color:#e48d=
27;"><span style=3D"color: #000;" class=3D"styled-by-prettify">words</span>=
</span><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span></span><span style=3D" color:#e6e5e2;"><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span></span><spa=
n style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> </span></span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">{</span><span style=3D" color:#e6db74;"><span style=3D"color: #080=
;" class=3D"styled-by-prettify">&quot;eSkry&quot;</span></span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D" colo=
r:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </sp=
an></span><span style=3D" color:#e6db74;"><span style=3D"color: #080;" clas=
s=3D"styled-by-prettify">&quot;Cat&quot;</span></span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">,</span><span style=3D" color:#3e3d32;=
"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span>=
<span style=3D" color:#e6db74;"><span style=3D"color: #080;" class=3D"style=
d-by-prettify">&quot;Dog&quot;</span></span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">,</span><span style=3D" color:#3e3d32;"><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span styl=
e=3D" color:#e6db74;"><span style=3D"color: #080;" class=3D"styled-by-prett=
ify">&quot;Human&quot;</span></span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">};</span></pre><pre><span style=3D" color:#a6e22e;"><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify">print_container</span=
></span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><=
span style=3D" color:#e48d27;"><span style=3D"color: #000;" class=3D"styled=
-by-prettify">words</span></span><span style=3D" color:#e6e5e2;"><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">.</span></span><span style=
=3D" color:#a6e22e;"><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">begin</span></span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">(),</span><span style=3D" color:#3e3d32;"><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span></span><span style=3D" color:#e48d27=
;"><span style=3D"color: #000;" class=3D"styled-by-prettify">words</span></=
span><span style=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D"=
styled-by-prettify">.</span></span><span style=3D" color:#a6e22e;"><span st=
yle=3D"color: #008;" class=3D"styled-by-prettify">end</span></span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">(),</span><span style=3D"=
 color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 </span></span><span style=3D" font-style:italic; color:#ce5c00;"><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify">cout</span></span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">);</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #80=
0;" class=3D"styled-by-prettify">// Out in cout</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"><br><br></span><pre><span style=3D" co=
lor:#66d9ef;"><span style=3D"color: #000;" class=3D"styled-by-prettify">ofs=
tream</span></span><span style=3D" color:#3e3d32;"><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span></span><span style=3D" color:#e48=
d27;"><span style=3D"color: #000;" class=3D"styled-by-prettify">of</span></=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><spa=
n style=3D" color:#e6db74;"><span style=3D"color: #080;" class=3D"styled-by=
-prettify">&quot;text.txt&quot;</span></span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">);</span></pre><pre><span style=3D" color:#f926=
72;"><span style=3D"color: #008;" class=3D"styled-by-prettify">if</span></s=
pan><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> </span></span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">(</span><span style=3D" color:#e48d27;"><span style=3D"col=
or: #000;" class=3D"styled-by-prettify">of</span></span><span style=3D" col=
or:#e6e5e2;"><span style=3D"color: #660;" class=3D"styled-by-prettify">.</s=
pan></span><span style=3D" color:#a6e22e;"><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify">is_open</span></span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">()){</span></pre><pre><span style=3D" color:#=
3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> =C2=A0 =
=C2=A0</span></span><span style=3D" color:#a6e22e;"><span style=3D"color: #=
000;" class=3D"styled-by-prettify">print_container</span></span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D" colo=
r:#e48d27;"><span style=3D"color: #000;" class=3D"styled-by-prettify">words=
</span></span><span style=3D" color:#e6e5e2;"><span style=3D"color: #660;" =
class=3D"styled-by-prettify">.</span></span><span style=3D" color:#a6e22e;"=
><span style=3D"color: #008;" class=3D"styled-by-prettify">begin</span></sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">(),</span><spa=
n style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> </span></span><span style=3D" color:#e48d27;"><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">words</span></span><span style=3D"=
 color:#e6e5e2;"><span style=3D"color: #660;" class=3D"styled-by-prettify">=
..</span></span><span style=3D" color:#a6e22e;"><span style=3D"color: #008;"=
 class=3D"styled-by-prettify">end</span></span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">(),</span><span style=3D" color:#3e3d32;"><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span=
 style=3D" color:#e48d27;"><span style=3D"color: #000;" class=3D"styled-by-=
prettify">of</span></span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">);</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> </span><span style=3D"color: #800;" class=3D"styled-by-prettify">/* Out i=
n file */</span></pre><pre><span style=3D" color:#e48d27;"><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0of</span></span><sp=
an style=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">.</span></span><span style=3D" color:#a6e22e;"><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify">close</span></span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">();</span></pre><pre><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">}</span></pre></pre></div><=
/code></div><br><br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/95d54f1e-0e75-4a6d-aea4-902f2b3865e0%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/95d54f1e-0e75-4a6d-aea4-902f2b3865e0=
%40isocpp.org</a>.<br />

------=_Part_1329_1508260805.1537100748084--

------=_Part_1328_380184210.1537100748083--

.


Author: vladsudakov5@gmail.com
Date: Sun, 16 Sep 2018 05:40:40 -0700 (PDT)
Raw View
------=_Part_1265_1683407753.1537101641153
Content-Type: multipart/alternative;
 boundary="----=_Part_1266_1859559147.1537101641154"

------=_Part_1266_1859559147.1537101641154
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Great idea!

=D0=B2=D0=BE=D1=81=D0=BA=D1=80=D0=B5=D1=81=D0=B5=D0=BD=D1=8C=D0=B5, 16 =D1=
=81=D0=B5=D0=BD=D1=82=D1=8F=D0=B1=D1=80=D1=8F 2018 =D0=B3., 15:06:25 UTC+3 =
=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C=20
reacto...@gmail.com =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
>
> I propose to add the ability to output containers using stream.
>
> Example:
>
> std::vector<std::string> strings =3D {"Hello", "cout!"};
>
> cout << strings << endl;
>
>
> Result in console:=20
> {"Hello", "cout!"}
>
> And out in file:
>
> std::vector<std::string> strings =3D {"Hello", "ofstream!"};
> std::ofstream of("text.txt");
> if (of.is_open()){
>     of << strings;
>     of.close();
> }
>
>
> In file:
> {"Hello", "ofstream!"}
>
> For user classes need overload - operator<<
>

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/6d345c1c-3ecf-4ebf-aae1-26f267318337%40isocpp.or=
g.

------=_Part_1266_1859559147.1537101641154
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Great idea!<br><br>=D0=B2=D0=BE=D1=81=D0=BA=D1=80=D0=B5=D1=
=81=D0=B5=D0=BD=D1=8C=D0=B5, 16 =D1=81=D0=B5=D0=BD=D1=82=D1=8F=D0=B1=D1=80=
=D1=8F 2018 =D0=B3., 15:06:25 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=
=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C reacto...@gmail.com =D0=BD=D0=B0=D0=BF=D0=
=B8=D1=81=D0=B0=D0=BB:<blockquote class=3D"gmail_quote" style=3D"margin: 0;=
margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr">I propose to add the ability to output containers using stream.<di=
v><br></div><div>Example:</div><div><div style=3D"background-color:rgb(250,=
250,250);border-color:rgb(187,187,187);border-style:solid;border-width:1px"=
><code><div><pre><span style=3D"color:#66d9ef"><span style=3D"color:#000">s=
td</span></span><span style=3D"color:#660">::</span><span style=3D"color:#6=
6d9ef"><span style=3D"color:#000">vector</span></span><span style=3D"color:=
#660">&lt;</span><span style=3D"color:#66d9ef"><span style=3D"color:#000">s=
td</span></span><span style=3D"color:#660">::</span><span style=3D"color:#6=
6d9ef"><span style=3D"color:#008">string</span></span><span style=3D"color:=
#660">&gt;</span><span style=3D"color:#3e3d32"><span style=3D"color:#000"> =
</span></span><span style=3D"color:#e48d27"><span style=3D"color:#000">stri=
ngs</span></span><span style=3D"color:#3e3d32"><span style=3D"color:#000"> =
</span></span><span style=3D"color:#e6e5e2"><span style=3D"color:#660">=3D<=
/span></span><span style=3D"color:#3e3d32"><span style=3D"color:#000"> </sp=
an></span><span style=3D"color:#660">{</span><span style=3D"color:#e6db74">=
<span style=3D"color:#080">&quot;Hello&quot;</span></span><span style=3D"co=
lor:#660">,</span><span style=3D"color:#3e3d32"><span style=3D"color:#000">=
 </span></span><span style=3D"color:#e6db74"><span style=3D"color:#080">&qu=
ot;cout!&quot;</span></span><span style=3D"color:#660">};</span></pre><pre>=
<span style=3D"color:#000">cout</span><span style=3D"color:#3e3d32"><span s=
tyle=3D"color:#000"> </span></span><span style=3D"color:#e6e5e2"><span styl=
e=3D"color:#660">&lt;&lt;</span></span><span style=3D"color:#3e3d32"><span =
style=3D"color:#000"> </span></span><span style=3D"color:#000">strings</spa=
n><span style=3D"color:#3e3d32"><span style=3D"color:#000"> </span></span><=
span style=3D"color:#e6e5e2"><span style=3D"color:#660">&lt;&lt;</span></sp=
an><span style=3D"color:#3e3d32"><span style=3D"color:#000"> </span></span>=
<span style=3D"color:#000">endl</span><span style=3D"color:#660">;</span></=
pre></div></code></div><br></div><div>Result in console:=C2=A0</div><div><d=
iv style=3D"background-color:rgb(250,250,250);border-color:rgb(187,187,187)=
;border-style:solid;border-width:1px"><code><div><font color=3D"#666600"><s=
pan style=3D"color:#660">{</span><span style=3D"color:#080">&quot;Hello&quo=
t;</span><span style=3D"color:#660">,</span><span style=3D"color:#000"> </s=
pan><span style=3D"color:#080">&quot;cout!&quot;</span><span style=3D"color=
:#660">}</span></font></div></code></div><br>And out in file:</div><div><di=
v style=3D"background-color:rgb(250,250,250);border-color:rgb(187,187,187);=
border-style:solid;border-width:1px"><code><div><pre><span style=3D"color:r=
gb(102,217,239)"><span style=3D"color:#000">std</span></span><span style=3D=
"color:#660">::</span><span style=3D"color:rgb(102,217,239)"><span style=3D=
"color:#000">vector</span></span><span style=3D"color:#660">&lt;</span><spa=
n style=3D"color:rgb(102,217,239)"><span style=3D"color:#000">std</span></s=
pan><span style=3D"color:#660">::</span><span style=3D"color:rgb(102,217,23=
9)"><span style=3D"color:#008">string</span></span><span style=3D"color:#66=
0">&gt;</span><span style=3D"color:rgb(62,61,50)"><span style=3D"color:#000=
"> </span></span><span style=3D"color:rgb(228,141,39)"><span style=3D"color=
:#000">strings</span></span><span style=3D"color:rgb(62,61,50)"><span style=
=3D"color:#000"> </span></span><span style=3D"color:rgb(230,229,226)"><span=
 style=3D"color:#660">=3D</span></span><span style=3D"color:rgb(62,61,50)">=
<span style=3D"color:#000"> </span></span><span style=3D"color:#660">{</spa=
n><span style=3D"color:rgb(230,219,116)"><span style=3D"color:#080">&quot;H=
ello&quot;</span></span><span style=3D"color:#660">,</span><span style=3D"c=
olor:rgb(62,61,50)"><span style=3D"color:#000"> </span></span><span style=
=3D"color:rgb(230,219,116)"><span style=3D"color:#080">&quot;ofstream!&quot=
;</span></span><span style=3D"color:#660">};</span><span style=3D"color:#00=
0"><br>std</span><span style=3D"color:#660">::</span><span style=3D"color:#=
000">ofstream of</span><span style=3D"color:#660">(</span><span style=3D"co=
lor:#080">&quot;text.txt&quot;</span><span style=3D"color:#660">);</span><s=
pan style=3D"color:#000"><br></span><span style=3D"color:#008">if</span><sp=
an style=3D"color:#000"> </span><span style=3D"color:#660">(</span><span st=
yle=3D"color:#000">of</span><span style=3D"color:#660">.</span><span style=
=3D"color:#000">is_open</span><span style=3D"color:#660">()){</span><span s=
tyle=3D"color:#000"><br>=C2=A0 =C2=A0 of </span><span style=3D"color:#660">=
&lt;&lt;</span><span style=3D"color:#000"> strings</span><span style=3D"col=
or:#660">;</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 </span><font =
color=3D"#666600"><span style=3D"color:#000">of</span><span style=3D"color:=
#660">.</span><span style=3D"color:#000">close</span><span style=3D"color:#=
660">();</span></font><span style=3D"color:#000"><br></span><span style=3D"=
color:#660">}</span></pre></div></code></div><br>In file:</div><div><div st=
yle=3D"background-color:rgb(250,250,250);border-color:rgb(187,187,187);bord=
er-style:solid;border-width:1px"><code><div><span style=3D"color:#660">{</s=
pan><span style=3D"color:#080">&quot;Hello&quot;</span><span style=3D"color=
:#660">,</span><span style=3D"color:#000"> </span><span style=3D"color:#080=
">&quot;ofstream!&quot;</span><span style=3D"color:#660">}</span></div></co=
de></div><br>For user classes need overload - operator&lt;&lt;</div></div><=
/blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/6d345c1c-3ecf-4ebf-aae1-26f267318337%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/6d345c1c-3ecf-4ebf-aae1-26f267318337=
%40isocpp.org</a>.<br />

------=_Part_1266_1859559147.1537101641154--

------=_Part_1265_1683407753.1537101641153--

.


Author: Thiago Macieira <thiago@macieira.org>
Date: Sun, 16 Sep 2018 15:09:50 -0700
Raw View
On Sunday, 16 September 2018 05:06:25 PDT reactor.game@gmail.com wrote:
> In file:
> {"Hello", "ofstream!"}

What if I want a different format? By far, the most common way would be to
have one string per line, no brackets.

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center



--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2887748.YnZhCU9sPy%40tjmaciei-mobl1.

.


Author: reactor.game@gmail.com
Date: Sun, 16 Sep 2018 17:19:00 -0700 (PDT)
Raw View
------=_Part_1384_1755918280.1537143540258
Content-Type: multipart/alternative;
 boundary="----=_Part_1385_59971737.1537143540259"

------=_Part_1385_59971737.1537143540259
Content-Type: text/plain; charset="UTF-8"


>
> What if I want a different format? By far, the most common way would be to
> have one string per line, no brackets.
>

For example:

template<typename Iterator_t>

void print_container_beautiful(Iterator_t begin, Iterator_t end, std::ostream& os

        , char delimiter = ',', bool print_brackets = true, char bracket_open = '{', char braacket_close = '}'){


    if (print_brackets) os << bracket_open;

    while (begin < end-1){

        os << *begin << delimiter;

        ++begin;

    }

    os << *begin;

    if (print_brackets) os << braacket_close;

}


int main() {

    vector<string> words = {"Thousand Foot Krutch", "Nickelback", "The Rasmus", "Aggressiful"};

    print_container_beautiful(words.begin(), words.end(), cout, ',', false); // Print in console: Thousand Foot Krutch,Nickelback,The Rasmus,Aggressiful

    print_container_beautiful(words.begin(), words.end(), cout, ',', true); // Print in console: {Thousand Foot Krutch,Nickelback,The Rasmus,Aggressiful}

}


--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/24385a93-ed9f-47a1-8ecb-64e67214d365%40isocpp.org.

------=_Part_1385_59971737.1537143540259
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">What if I wan=
t a different format? By far, the most common way would be to=20
<br>have one string per line, no brackets.
<br></blockquote><div><br></div><div>For example:</div><div><div class=3D"p=
rettyprint" style=3D"background-color: rgb(250, 250, 250); border-color: rg=
b(187, 187, 187); border-style: solid; border-width: 1px; overflow-wrap: br=
eak-word;"><code class=3D"prettyprint"><div class=3D"subprettyprint"><pre><=
span style=3D" color:#f92672;"><span style=3D"color: #008;" class=3D"styled=
-by-prettify">template</span></span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">&lt;</span><span style=3D" color:#f92672;"><span style=
=3D"color: #008;" class=3D"styled-by-prettify">typename</span></span><span =
style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span></span><span style=3D" color:#66d9ef;"><span style=3D"colo=
r: #606;" class=3D"styled-by-prettify">Iterator_t</span></span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span></pre><pre><span =
style=3D" font-style:italic; color:#66d9ef;"><span style=3D"color: #008;" c=
lass=3D"styled-by-prettify">void</span></span><span style=3D" color:#3e3d32=
;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span=
><span style=3D" font-weight:600; color:#a6e22e;"><span style=3D"color: #00=
0;" class=3D"styled-by-prettify">print_container_beautiful</span></span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=
=3D" color:#66d9ef;"><span style=3D"color: #606;" class=3D"styled-by-pretti=
fy">Iterator_t</span></span><span style=3D" color:#3e3d32;"><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span></span><span style=3D" c=
olor:#e48d27;"><span style=3D"color: #008;" class=3D"styled-by-prettify">be=
gin</span></span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
,</span><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span></span><span style=3D" color:#66d9ef;"><spa=
n style=3D"color: #606;" class=3D"styled-by-prettify">Iterator_t</span></sp=
an><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> </span></span><span style=3D" color:#e48d27;"><span styl=
e=3D"color: #008;" class=3D"styled-by-prettify">end</span></span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D" col=
or:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </s=
pan></span><span style=3D" color:#66d9ef;"><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify">std</span></span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">::</span><span style=3D" color:#66d9ef;"><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify">ostream</span></span><spa=
n style=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D"styled-by=
-prettify">&amp;</span></span><span style=3D" color:#3e3d32;"><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span style=
=3D" color:#e48d27;"><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">os</span></span></pre><pre><span style=3D" color:#3e3d32;"><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0 =C2=A0 =C2=A0=
</span></span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</=
span><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> </span></span><span style=3D" font-style:italic; color=
:#66d9ef;"><span style=3D"color: #008;" class=3D"styled-by-prettify">char</=
span></span><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span></span><span style=3D" color:#e48d27;"><=
span style=3D"color: #000;" class=3D"styled-by-prettify">delimiter</span></=
span><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> </span></span><span style=3D" color:#e6e5e2;"><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">=3D</span></span><span st=
yle=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> </span></span><span style=3D" color:#e6db74;"><span style=3D"color:=
 #080;" class=3D"styled-by-prettify">&#39;,&#39;</span></span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D" colo=
r:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </sp=
an></span><span style=3D" font-style:italic; color:#66d9ef;"><span style=3D=
"color: #008;" class=3D"styled-by-prettify">bool</span></span><span style=
=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> </span></span><span style=3D" color:#e48d27;"><span style=3D"color: #0=
00;" class=3D"styled-by-prettify">print_brackets</span></span><span style=
=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> </span></span><span style=3D" color:#e6e5e2;"><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">=3D</span></span><span style=3D" color:#3=
e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
/span><span style=3D" color:#f92672;"><span style=3D"color: #008;" class=3D=
"styled-by-prettify">true</span></span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">,</span><span style=3D" color:#3e3d32;"><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span style=
=3D" font-style:italic; color:#66d9ef;"><span style=3D"color: #008;" class=
=3D"styled-by-prettify">char</span></span><span style=3D" color:#3e3d32;"><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><sp=
an style=3D" color:#e48d27;"><span style=3D"color: #000;" class=3D"styled-b=
y-prettify">bracket_open</span></span><span style=3D" color:#3e3d32;"><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span s=
tyle=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">=3D</span></span><span style=3D" color:#3e3d32;"><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> </span></span><span style=3D" colo=
r:#e6db74;"><span style=3D"color: #080;" class=3D"styled-by-prettify">&#39;=
{&#39;</span></span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">,</span><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> </span></span><span style=3D" font-style:italic;=
 color:#66d9ef;"><span style=3D"color: #008;" class=3D"styled-by-prettify">=
char</span></span><span style=3D" color:#3e3d32;"><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> </span></span><span style=3D" color:#e48d=
27;"><span style=3D"color: #000;" class=3D"styled-by-prettify">braacket_clo=
se</span></span><span style=3D" color:#3e3d32;"><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span></span><span style=3D" color:#e6e5e2=
;"><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span></sp=
an><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> </span></span><span style=3D" color:#e6db74;"><span styl=
e=3D"color: #080;" class=3D"styled-by-prettify">&#39;}&#39;</span></span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">){</span></pre><pre=
><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span></pre=
><pre><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D=
"styled-by-prettify">=C2=A0 =C2=A0 </span></span><span style=3D" color:#f92=
672;"><span style=3D"color: #008;" class=3D"styled-by-prettify">if</span></=
span><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> </span></span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">(</span><span style=3D" color:#e48d27;"><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">print_brackets</span></span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span style=3D"=
 color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 </span></span><span style=3D" color:#e48d27;"><span style=3D"color: #000;"=
 class=3D"styled-by-prettify">os</span></span><span style=3D" color:#3e3d32=
;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span=
><span style=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">&lt;&lt;</span></span><span style=3D" color:#3e3d32;"><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span s=
tyle=3D" color:#e48d27;"><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify">bracket_open</span></span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">;</span></pre><pre><span style=3D" color:#3e3d32;"><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0</span></s=
pan><span style=3D" color:#f92672;"><span style=3D"color: #008;" class=3D"s=
tyled-by-prettify">while</span></span><span style=3D" color:#3e3d32;"><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D" =
color:#e48d27;"><span style=3D"color: #008;" class=3D"styled-by-prettify">b=
egin</span></span><span style=3D" color:#3e3d32;"><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> </span></span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">&lt;</span><span style=3D" color:#3e3d32;"><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><sp=
an style=3D" color:#e48d27;"><span style=3D"color: #008;" class=3D"styled-b=
y-prettify">end</span></span><span style=3D" color:#e6e5e2;"><span style=3D=
"color: #660;" class=3D"styled-by-prettify">-</span></span><span style=3D" =
color:#ae81ff;"><span style=3D"color: #066;" class=3D"styled-by-prettify">1=
</span></span><span style=3D"color: #660;" class=3D"styled-by-prettify">){<=
/span></pre><pre><span style=3D" color:#3e3d32;"><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0 =C2=A0 =C2=A0</span></span><=
span style=3D" color:#e48d27;"><span style=3D"color: #000;" class=3D"styled=
-by-prettify">os</span></span><span style=3D" color:#3e3d32;"><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span style=
=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">&lt;&lt;</span></span><span style=3D" color:#3e3d32;"><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span></span><span style=3D" col=
or:#e6e5e2;"><span style=3D"color: #660;" class=3D"styled-by-prettify">*</s=
pan></span><span style=3D" color:#e48d27;"><span style=3D"color: #008;" cla=
ss=3D"styled-by-prettify">begin</span></span><span style=3D" color:#3e3d32;=
"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span>=
<span style=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D"style=
d-by-prettify">&lt;&lt;</span></span><span style=3D" color:#3e3d32;"><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span st=
yle=3D" color:#e48d27;"><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify">delimiter</span></span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">;</span></pre><pre><span style=3D" color:#3e3d32;"><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0 =C2=A0 =C2=A0=
</span></span><span style=3D" color:#e6e5e2;"><span style=3D"color: #660;" =
class=3D"styled-by-prettify">++</span></span><span style=3D" color:#e48d27;=
"><span style=3D"color: #008;" class=3D"styled-by-prettify">begin</span></s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span></pre=
><pre><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> =C2=A0 =C2=A0</span></span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">}</span></pre><pre><span style=3D" color:#3=
e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> =C2=A0 =
=C2=A0</span></span><span style=3D" color:#e48d27;"><span style=3D"color: #=
000;" class=3D"styled-by-prettify">os</span></span><span style=3D" color:#3=
e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
/span><span style=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D=
"styled-by-prettify">&lt;&lt;</span></span><span style=3D" color:#3e3d32;">=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><s=
pan style=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D"styled-=
by-prettify">*</span></span><span style=3D" color:#e48d27;"><span style=3D"=
color: #008;" class=3D"styled-by-prettify">begin</span></span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">;</span></pre><pre><span sty=
le=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> =C2=A0 =C2=A0</span></span><span style=3D" color:#f92672;"><span sty=
le=3D"color: #008;" class=3D"styled-by-prettify">if</span></span><span styl=
e=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span></span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">(</span><span style=3D" color:#e48d27;"><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify">print_brackets</span></span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">)</span><span style=3D" color:#3e3d32;=
"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span>=
<span style=3D" color:#e48d27;"><span style=3D"color: #000;" class=3D"style=
d-by-prettify">os</span></span><span style=3D" color:#3e3d32;"><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span style=
=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">&lt;&lt;</span></span><span style=3D" color:#3e3d32;"><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span></span><span style=3D" col=
or:#e48d27;"><span style=3D"color: #000;" class=3D"styled-by-prettify">braa=
cket_close</span></span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">;</span></pre><pre><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">}</span></pre><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"><br></span><pre><span style=3D" font-style:italic; color:#66d9ef;"><s=
pan style=3D"color: #008;" class=3D"styled-by-prettify">int</span></span><s=
pan style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span></span><span style=3D" font-weight:600; color:#a6e22e;=
"><span style=3D"color: #000;" class=3D"styled-by-prettify">main</span></sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">()</span><span=
 style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span></span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">{</span></pre><pre><span style=3D" color:#3e3d32;"><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0</span></span><span=
 style=3D" color:#66d9ef;"><span style=3D"color: #000;" class=3D"styled-by-=
prettify">vector</span></span><span style=3D"color: #080;" class=3D"styled-=
by-prettify">&lt;</span><span style=3D" color:#66d9ef;"><span style=3D"colo=
r: #080;" class=3D"styled-by-prettify">string</span></span><span style=3D"c=
olor: #080;" class=3D"styled-by-prettify">&gt;</span><span style=3D" color:=
#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
></span><span style=3D" color:#e48d27;"><span style=3D"color: #000;" class=
=3D"styled-by-prettify">words</span></span><span style=3D" color:#3e3d32;">=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><s=
pan style=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D"styled-=
by-prettify">=3D</span></span><span style=3D" color:#3e3d32;"><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=3D" colo=
r:#e6db74;"><span style=3D"color: #080;" class=3D"styled-by-prettify">&quot=
;Thousand</span></span><span style=3D" color:#3e3d32;"><span style=3D"color=
: #080;" class=3D"styled-by-prettify"> </span></span><span style=3D" color:=
#e6db74;"><span style=3D"color: #080;" class=3D"styled-by-prettify">Foot</s=
pan></span><span style=3D" color:#3e3d32;"><span style=3D"color: #080;" cla=
ss=3D"styled-by-prettify"> </span></span><span style=3D" color:#e6db74;"><s=
pan style=3D"color: #080;" class=3D"styled-by-prettify">Krutch&quot;</span>=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><s=
pan style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span></span><span style=3D" color:#e6db74;"><span style=3D"=
color: #080;" class=3D"styled-by-prettify">&quot;Nickelback&quot;</span></s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span=
 style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span></span><span style=3D" color:#e6db74;"><span style=3D"col=
or: #080;" class=3D"styled-by-prettify">&quot;The</span></span><span style=
=3D" color:#3e3d32;"><span style=3D"color: #080;" class=3D"styled-by-pretti=
fy"> </span></span><span style=3D" color:#e6db74;"><span style=3D"color: #0=
80;" class=3D"styled-by-prettify">Rasmus&quot;</span></span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">,</span><span style=3D" color:#3=
e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
/span><span style=3D" color:#e6db74;"><span style=3D"color: #080;" class=3D=
"styled-by-prettify">&quot;Aggressiful&quot;</span></span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">};</span></pre><pre><span style=3D=
" color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> =C2=A0 =C2=A0</span></span><span style=3D" color:#a6e22e;"><span style=3D=
"color: #000;" class=3D"styled-by-prettify">print_container_beautiful</span=
></span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><=
span style=3D" color:#e48d27;"><span style=3D"color: #000;" class=3D"styled=
-by-prettify">words</span></span><span style=3D" color:#e6e5e2;"><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">.</span></span><span style=
=3D" color:#a6e22e;"><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">begin</span></span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">(),</span><span style=3D" color:#3e3d32;"><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span></span><span style=3D" color:#e48d27=
;"><span style=3D"color: #000;" class=3D"styled-by-prettify">words</span></=
span><span style=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D"=
styled-by-prettify">.</span></span><span style=3D" color:#a6e22e;"><span st=
yle=3D"color: #008;" class=3D"styled-by-prettify">end</span></span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">(),</span><span style=3D"=
 color:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 </span></span><span style=3D" font-style:italic; color:#ce5c00;"><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify">cout</span></span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D" c=
olor:#3e3d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> <=
/span></span><span style=3D" color:#e6db74;"><span style=3D"color: #080;" c=
lass=3D"styled-by-prettify">&#39;,&#39;</span></span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">,</span><span style=3D" color:#3e3d32;"=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><=
span style=3D" color:#f92672;"><span style=3D"color: #008;" class=3D"styled=
-by-prettify">false</span></span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">);</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> </span><span style=3D"color: #800;" class=3D"styled-by-prettify">/=
/ Print in console: Thousand Foot Krutch,Nickelback,The Rasmus,Aggressiful<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span>=
<pre><span style=3D" color:#a6e22e;"><span style=3D"color: #000;" class=3D"=
styled-by-prettify">=C2=A0 =C2=A0 print_container_beautiful</span></span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=
=3D" color:#e48d27;"><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">words</span></span><span style=3D" color:#e6e5e2;"><span style=3D"color=
: #660;" class=3D"styled-by-prettify">.</span></span><span style=3D" color:=
#a6e22e;"><span style=3D"color: #008;" class=3D"styled-by-prettify">begin</=
span></span><span style=3D"color: #660;" class=3D"styled-by-prettify">(),</=
span><span style=3D" color:#3e3d32;"><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> </span></span><span style=3D" color:#e48d27;"><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify">words</span></span><span =
style=3D" color:#e6e5e2;"><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">.</span></span><span style=3D" color:#a6e22e;"><span style=3D"colo=
r: #008;" class=3D"styled-by-prettify">end</span></span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">(),</span><span style=3D" color:#3e3=
d32;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></s=
pan><span style=3D" font-style:italic; color:#ce5c00;"><span style=3D"color=
: #000;" class=3D"styled-by-prettify">cout</span></span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">,</span><span style=3D" color:#3e3d3=
2;"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></spa=
n><span style=3D" color:#e6db74;"><span style=3D"color: #080;" class=3D"sty=
led-by-prettify">&#39;,&#39;</span></span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">,</span><span style=3D" color:#3e3d32;"><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> </span></span><span style=
=3D" color:#f92672;"><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">true</span></span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">);</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </=
span><span style=3D"color: #800;" class=3D"styled-by-prettify">// Print in =
console: {Thousand Foot Krutch,Nickelback,The Rasmus,Aggressiful}</span></p=
re></pre><span style=3D"color: #800;" class=3D"styled-by-prettify">}</span>=
</div></code></div><br><br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/24385a93-ed9f-47a1-8ecb-64e67214d365%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/24385a93-ed9f-47a1-8ecb-64e67214d365=
%40isocpp.org</a>.<br />

------=_Part_1385_59971737.1537143540259--

------=_Part_1384_1755918280.1537143540258--

.


Author: Dejan Milosavljevic <dmilos@gmail.com>
Date: Mon, 17 Sep 2018 12:40:22 +0200
Raw View
--000000000000944dee05760ecd3c
Content-Type: text/plain; charset="UTF-8"

It is better to leave this problem to serialization.

On Mon, Sep 17, 2018 at 2:19 AM <reactor.game@gmail.com> wrote:

> What if I want a different format? By far, the most common way would be to
>> have one string per line, no brackets.
>>
>
> For example:
>
> template<typename Iterator_t>
>
> void print_container_beautiful(Iterator_t begin, Iterator_t end, std::ostream& os
>
>         , char delimiter = ',', bool print_brackets = true, char bracket_open = '{', char braacket_close = '}'){
>
>
>     if (print_brackets) os << bracket_open;
>
>     while (begin < end-1){
>
>         os << *begin << delimiter;
>
>         ++begin;
>
>     }
>
>     os << *begin;
>
>     if (print_brackets) os << braacket_close;
>
> }
>
>
> int main() {
>
>     vector<string> words = {"Thousand Foot Krutch", "Nickelback", "The Rasmus", "Aggressiful"};
>
>     print_container_beautiful(words.begin(), words.end(), cout, ',', false); // Print in console: Thousand Foot Krutch,Nickelback,The Rasmus,Aggressiful
>
>     print_container_beautiful(words.begin(), words.end(), cout, ',', true); // Print in console: {Thousand Foot Krutch,Nickelback,The Rasmus,Aggressiful}
>
> }
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/24385a93-ed9f-47a1-8ecb-64e67214d365%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/24385a93-ed9f-47a1-8ecb-64e67214d365%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAEfefmxCH_XZnG%3D2tDxYgoH6zB5V9%2BBi_FTEyM-Guj2YZJNHyA%40mail.gmail.com.

--000000000000944dee05760ecd3c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">It is better to leave this problem to ser=
ialization.<br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">=
On Mon, Sep 17, 2018 at 2:19 AM &lt;<a href=3D"mailto:reactor.game@gmail.co=
m">reactor.game@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex"><div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin:0;=
margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">What if I wa=
nt a different format? By far, the most common way would be to=20
<br>have one string per line, no brackets.
<br></blockquote><div><br></div><div>For example:</div><div><div class=3D"m=
_8765253235977339509prettyprint" style=3D"background-color:rgb(250,250,250)=
;border-color:rgb(187,187,187);border-style:solid;border-width:1px"><code c=
lass=3D"m_8765253235977339509prettyprint"><div class=3D"m_87652532359773395=
09subprettyprint"><pre><span style=3D"color:#f92672"><span style=3D"color:#=
008" class=3D"m_8765253235977339509styled-by-prettify">template</span></spa=
n><span style=3D"color:#660" class=3D"m_8765253235977339509styled-by-pretti=
fy">&lt;</span><span style=3D"color:#f92672"><span style=3D"color:#008" cla=
ss=3D"m_8765253235977339509styled-by-prettify">typename</span></span><span =
style=3D"color:#3e3d32"><span style=3D"color:#000" class=3D"m_8765253235977=
339509styled-by-prettify"> </span></span><span style=3D"color:#66d9ef"><spa=
n style=3D"color:#606" class=3D"m_8765253235977339509styled-by-prettify">It=
erator_t</span></span><span style=3D"color:#660" class=3D"m_876525323597733=
9509styled-by-prettify">&gt;</span></pre><pre><span style=3D"font-style:ita=
lic;color:#66d9ef"><span style=3D"color:#008" class=3D"m_876525323597733950=
9styled-by-prettify">void</span></span><span style=3D"color:#3e3d32"><span =
style=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify"> </s=
pan></span><span style=3D"font-weight:600;color:#a6e22e"><span style=3D"col=
or:#000" class=3D"m_8765253235977339509styled-by-prettify">print_container_=
beautiful</span></span><span style=3D"color:#660" class=3D"m_87652532359773=
39509styled-by-prettify">(</span><span style=3D"color:#66d9ef"><span style=
=3D"color:#606" class=3D"m_8765253235977339509styled-by-prettify">Iterator_=
t</span></span><span style=3D"color:#3e3d32"><span style=3D"color:#000" cla=
ss=3D"m_8765253235977339509styled-by-prettify"> </span></span><span style=
=3D"color:#e48d27"><span style=3D"color:#008" class=3D"m_876525323597733950=
9styled-by-prettify">begin</span></span><span style=3D"color:#660" class=3D=
"m_8765253235977339509styled-by-prettify">,</span><span style=3D"color:#3e3=
d32"><span style=3D"color:#000" class=3D"m_8765253235977339509styled-by-pre=
ttify"> </span></span><span style=3D"color:#66d9ef"><span style=3D"color:#6=
06" class=3D"m_8765253235977339509styled-by-prettify">Iterator_t</span></sp=
an><span style=3D"color:#3e3d32"><span style=3D"color:#000" class=3D"m_8765=
253235977339509styled-by-prettify"> </span></span><span style=3D"color:#e48=
d27"><span style=3D"color:#008" class=3D"m_8765253235977339509styled-by-pre=
ttify">end</span></span><span style=3D"color:#660" class=3D"m_8765253235977=
339509styled-by-prettify">,</span><span style=3D"color:#3e3d32"><span style=
=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify"> </span><=
/span><span style=3D"color:#66d9ef"><span style=3D"color:#000" class=3D"m_8=
765253235977339509styled-by-prettify">std</span></span><span style=3D"color=
:#660" class=3D"m_8765253235977339509styled-by-prettify">::</span><span sty=
le=3D"color:#66d9ef"><span style=3D"color:#000" class=3D"m_8765253235977339=
509styled-by-prettify">ostream</span></span><span style=3D"color:#e6e5e2"><=
span style=3D"color:#660" class=3D"m_8765253235977339509styled-by-prettify"=
>&amp;</span></span><span style=3D"color:#3e3d32"><span style=3D"color:#000=
" class=3D"m_8765253235977339509styled-by-prettify"> </span></span><span st=
yle=3D"color:#e48d27"><span style=3D"color:#000" class=3D"m_876525323597733=
9509styled-by-prettify">os</span></span></pre><pre><span style=3D"color:#3e=
3d32"><span style=3D"color:#000" class=3D"m_8765253235977339509styled-by-pr=
ettify"> =C2=A0 =C2=A0 =C2=A0 =C2=A0</span></span><span style=3D"color:#660=
" class=3D"m_8765253235977339509styled-by-prettify">,</span><span style=3D"=
color:#3e3d32"><span style=3D"color:#000" class=3D"m_8765253235977339509sty=
led-by-prettify"> </span></span><span style=3D"font-style:italic;color:#66d=
9ef"><span style=3D"color:#008" class=3D"m_8765253235977339509styled-by-pre=
ttify">char</span></span><span style=3D"color:#3e3d32"><span style=3D"color=
:#000" class=3D"m_8765253235977339509styled-by-prettify"> </span></span><sp=
an style=3D"color:#e48d27"><span style=3D"color:#000" class=3D"m_8765253235=
977339509styled-by-prettify">delimiter</span></span><span style=3D"color:#3=
e3d32"><span style=3D"color:#000" class=3D"m_8765253235977339509styled-by-p=
rettify"> </span></span><span style=3D"color:#e6e5e2"><span style=3D"color:=
#660" class=3D"m_8765253235977339509styled-by-prettify">=3D</span></span><s=
pan style=3D"color:#3e3d32"><span style=3D"color:#000" class=3D"m_876525323=
5977339509styled-by-prettify"> </span></span><span style=3D"color:#e6db74">=
<span style=3D"color:#080" class=3D"m_8765253235977339509styled-by-prettify=
">&#39;,&#39;</span></span><span style=3D"color:#660" class=3D"m_8765253235=
977339509styled-by-prettify">,</span><span style=3D"color:#3e3d32"><span st=
yle=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify"> </spa=
n></span><span style=3D"font-style:italic;color:#66d9ef"><span style=3D"col=
or:#008" class=3D"m_8765253235977339509styled-by-prettify">bool</span></spa=
n><span style=3D"color:#3e3d32"><span style=3D"color:#000" class=3D"m_87652=
53235977339509styled-by-prettify"> </span></span><span style=3D"color:#e48d=
27"><span style=3D"color:#000" class=3D"m_8765253235977339509styled-by-pret=
tify">print_brackets</span></span><span style=3D"color:#3e3d32"><span style=
=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify"> </span><=
/span><span style=3D"color:#e6e5e2"><span style=3D"color:#660" class=3D"m_8=
765253235977339509styled-by-prettify">=3D</span></span><span style=3D"color=
:#3e3d32"><span style=3D"color:#000" class=3D"m_8765253235977339509styled-b=
y-prettify"> </span></span><span style=3D"color:#f92672"><span style=3D"col=
or:#008" class=3D"m_8765253235977339509styled-by-prettify">true</span></spa=
n><span style=3D"color:#660" class=3D"m_8765253235977339509styled-by-pretti=
fy">,</span><span style=3D"color:#3e3d32"><span style=3D"color:#000" class=
=3D"m_8765253235977339509styled-by-prettify"> </span></span><span style=3D"=
font-style:italic;color:#66d9ef"><span style=3D"color:#008" class=3D"m_8765=
253235977339509styled-by-prettify">char</span></span><span style=3D"color:#=
3e3d32"><span style=3D"color:#000" class=3D"m_8765253235977339509styled-by-=
prettify"> </span></span><span style=3D"color:#e48d27"><span style=3D"color=
:#000" class=3D"m_8765253235977339509styled-by-prettify">bracket_open</span=
></span><span style=3D"color:#3e3d32"><span style=3D"color:#000" class=3D"m=
_8765253235977339509styled-by-prettify"> </span></span><span style=3D"color=
:#e6e5e2"><span style=3D"color:#660" class=3D"m_8765253235977339509styled-b=
y-prettify">=3D</span></span><span style=3D"color:#3e3d32"><span style=3D"c=
olor:#000" class=3D"m_8765253235977339509styled-by-prettify"> </span></span=
><span style=3D"color:#e6db74"><span style=3D"color:#080" class=3D"m_876525=
3235977339509styled-by-prettify">&#39;{&#39;</span></span><span style=3D"co=
lor:#660" class=3D"m_8765253235977339509styled-by-prettify">,</span><span s=
tyle=3D"color:#3e3d32"><span style=3D"color:#000" class=3D"m_87652532359773=
39509styled-by-prettify"> </span></span><span style=3D"font-style:italic;co=
lor:#66d9ef"><span style=3D"color:#008" class=3D"m_8765253235977339509style=
d-by-prettify">char</span></span><span style=3D"color:#3e3d32"><span style=
=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify"> </span><=
/span><span style=3D"color:#e48d27"><span style=3D"color:#000" class=3D"m_8=
765253235977339509styled-by-prettify">braacket_close</span></span><span sty=
le=3D"color:#3e3d32"><span style=3D"color:#000" class=3D"m_8765253235977339=
509styled-by-prettify"> </span></span><span style=3D"color:#e6e5e2"><span s=
tyle=3D"color:#660" class=3D"m_8765253235977339509styled-by-prettify">=3D</=
span></span><span style=3D"color:#3e3d32"><span style=3D"color:#000" class=
=3D"m_8765253235977339509styled-by-prettify"> </span></span><span style=3D"=
color:#e6db74"><span style=3D"color:#080" class=3D"m_8765253235977339509sty=
led-by-prettify">&#39;}&#39;</span></span><span style=3D"color:#660" class=
=3D"m_8765253235977339509styled-by-prettify">){</span></pre><pre><span styl=
e=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify"><br></sp=
an></pre><pre><span style=3D"color:#3e3d32"><span style=3D"color:#000" clas=
s=3D"m_8765253235977339509styled-by-prettify">=C2=A0 =C2=A0 </span></span><=
span style=3D"color:#f92672"><span style=3D"color:#008" class=3D"m_87652532=
35977339509styled-by-prettify">if</span></span><span style=3D"color:#3e3d32=
"><span style=3D"color:#000" class=3D"m_8765253235977339509styled-by-pretti=
fy"> </span></span><span style=3D"color:#660" class=3D"m_876525323597733950=
9styled-by-prettify">(</span><span style=3D"color:#e48d27"><span style=3D"c=
olor:#000" class=3D"m_8765253235977339509styled-by-prettify">print_brackets=
</span></span><span style=3D"color:#660" class=3D"m_8765253235977339509styl=
ed-by-prettify">)</span><span style=3D"color:#3e3d32"><span style=3D"color:=
#000" class=3D"m_8765253235977339509styled-by-prettify"> </span></span><spa=
n style=3D"color:#e48d27"><span style=3D"color:#000" class=3D"m_87652532359=
77339509styled-by-prettify">os</span></span><span style=3D"color:#3e3d32"><=
span style=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify"=
> </span></span><span style=3D"color:#e6e5e2"><span style=3D"color:#660" cl=
ass=3D"m_8765253235977339509styled-by-prettify">&lt;&lt;</span></span><span=
 style=3D"color:#3e3d32"><span style=3D"color:#000" class=3D"m_876525323597=
7339509styled-by-prettify"> </span></span><span style=3D"color:#e48d27"><sp=
an style=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify">b=
racket_open</span></span><span style=3D"color:#660" class=3D"m_876525323597=
7339509styled-by-prettify">;</span></pre><pre><span style=3D"color:#3e3d32"=
><span style=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettif=
y"> =C2=A0 =C2=A0</span></span><span style=3D"color:#f92672"><span style=3D=
"color:#008" class=3D"m_8765253235977339509styled-by-prettify">while</span>=
</span><span style=3D"color:#3e3d32"><span style=3D"color:#000" class=3D"m_=
8765253235977339509styled-by-prettify"> </span></span><span style=3D"color:=
#660" class=3D"m_8765253235977339509styled-by-prettify">(</span><span style=
=3D"color:#e48d27"><span style=3D"color:#008" class=3D"m_876525323597733950=
9styled-by-prettify">begin</span></span><span style=3D"color:#3e3d32"><span=
 style=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify"> </=
span></span><span style=3D"color:#660" class=3D"m_8765253235977339509styled=
-by-prettify">&lt;</span><span style=3D"color:#3e3d32"><span style=3D"color=
:#000" class=3D"m_8765253235977339509styled-by-prettify"> </span></span><sp=
an style=3D"color:#e48d27"><span style=3D"color:#008" class=3D"m_8765253235=
977339509styled-by-prettify">end</span></span><span style=3D"color:#e6e5e2"=
><span style=3D"color:#660" class=3D"m_8765253235977339509styled-by-prettif=
y">-</span></span><span style=3D"color:#ae81ff"><span style=3D"color:#066" =
class=3D"m_8765253235977339509styled-by-prettify">1</span></span><span styl=
e=3D"color:#660" class=3D"m_8765253235977339509styled-by-prettify">){</span=
></pre><pre><span style=3D"color:#3e3d32"><span style=3D"color:#000" class=
=3D"m_8765253235977339509styled-by-prettify"> =C2=A0 =C2=A0 =C2=A0 =C2=A0</=
span></span><span style=3D"color:#e48d27"><span style=3D"color:#000" class=
=3D"m_8765253235977339509styled-by-prettify">os</span></span><span style=3D=
"color:#3e3d32"><span style=3D"color:#000" class=3D"m_8765253235977339509st=
yled-by-prettify"> </span></span><span style=3D"color:#e6e5e2"><span style=
=3D"color:#660" class=3D"m_8765253235977339509styled-by-prettify">&lt;&lt;<=
/span></span><span style=3D"color:#3e3d32"><span style=3D"color:#000" class=
=3D"m_8765253235977339509styled-by-prettify"> </span></span><span style=3D"=
color:#e6e5e2"><span style=3D"color:#660" class=3D"m_8765253235977339509sty=
led-by-prettify">*</span></span><span style=3D"color:#e48d27"><span style=
=3D"color:#008" class=3D"m_8765253235977339509styled-by-prettify">begin</sp=
an></span><span style=3D"color:#3e3d32"><span style=3D"color:#000" class=3D=
"m_8765253235977339509styled-by-prettify"> </span></span><span style=3D"col=
or:#e6e5e2"><span style=3D"color:#660" class=3D"m_8765253235977339509styled=
-by-prettify">&lt;&lt;</span></span><span style=3D"color:#3e3d32"><span sty=
le=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify"> </span=
></span><span style=3D"color:#e48d27"><span style=3D"color:#000" class=3D"m=
_8765253235977339509styled-by-prettify">delimiter</span></span><span style=
=3D"color:#660" class=3D"m_8765253235977339509styled-by-prettify">;</span><=
/pre><pre><span style=3D"color:#3e3d32"><span style=3D"color:#000" class=3D=
"m_8765253235977339509styled-by-prettify"> =C2=A0 =C2=A0 =C2=A0 =C2=A0</spa=
n></span><span style=3D"color:#e6e5e2"><span style=3D"color:#660" class=3D"=
m_8765253235977339509styled-by-prettify">++</span></span><span style=3D"col=
or:#e48d27"><span style=3D"color:#008" class=3D"m_8765253235977339509styled=
-by-prettify">begin</span></span><span style=3D"color:#660" class=3D"m_8765=
253235977339509styled-by-prettify">;</span></pre><pre><span style=3D"color:=
#3e3d32"><span style=3D"color:#000" class=3D"m_8765253235977339509styled-by=
-prettify"> =C2=A0 =C2=A0</span></span><span style=3D"color:#660" class=3D"=
m_8765253235977339509styled-by-prettify">}</span></pre><pre><span style=3D"=
color:#3e3d32"><span style=3D"color:#000" class=3D"m_8765253235977339509sty=
led-by-prettify"> =C2=A0 =C2=A0</span></span><span style=3D"color:#e48d27">=
<span style=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify=
">os</span></span><span style=3D"color:#3e3d32"><span style=3D"color:#000" =
class=3D"m_8765253235977339509styled-by-prettify"> </span></span><span styl=
e=3D"color:#e6e5e2"><span style=3D"color:#660" class=3D"m_87652532359773395=
09styled-by-prettify">&lt;&lt;</span></span><span style=3D"color:#3e3d32"><=
span style=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify"=
> </span></span><span style=3D"color:#e6e5e2"><span style=3D"color:#660" cl=
ass=3D"m_8765253235977339509styled-by-prettify">*</span></span><span style=
=3D"color:#e48d27"><span style=3D"color:#008" class=3D"m_876525323597733950=
9styled-by-prettify">begin</span></span><span style=3D"color:#660" class=3D=
"m_8765253235977339509styled-by-prettify">;</span></pre><pre><span style=3D=
"color:#3e3d32"><span style=3D"color:#000" class=3D"m_8765253235977339509st=
yled-by-prettify"> =C2=A0 =C2=A0</span></span><span style=3D"color:#f92672"=
><span style=3D"color:#008" class=3D"m_8765253235977339509styled-by-prettif=
y">if</span></span><span style=3D"color:#3e3d32"><span style=3D"color:#000"=
 class=3D"m_8765253235977339509styled-by-prettify"> </span></span><span sty=
le=3D"color:#660" class=3D"m_8765253235977339509styled-by-prettify">(</span=
><span style=3D"color:#e48d27"><span style=3D"color:#000" class=3D"m_876525=
3235977339509styled-by-prettify">print_brackets</span></span><span style=3D=
"color:#660" class=3D"m_8765253235977339509styled-by-prettify">)</span><spa=
n style=3D"color:#3e3d32"><span style=3D"color:#000" class=3D"m_87652532359=
77339509styled-by-prettify"> </span></span><span style=3D"color:#e48d27"><s=
pan style=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify">=
os</span></span><span style=3D"color:#3e3d32"><span style=3D"color:#000" cl=
ass=3D"m_8765253235977339509styled-by-prettify"> </span></span><span style=
=3D"color:#e6e5e2"><span style=3D"color:#660" class=3D"m_876525323597733950=
9styled-by-prettify">&lt;&lt;</span></span><span style=3D"color:#3e3d32"><s=
pan style=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify">=
 </span></span><span style=3D"color:#e48d27"><span style=3D"color:#000" cla=
ss=3D"m_8765253235977339509styled-by-prettify">braacket_close</span></span>=
<span style=3D"color:#660" class=3D"m_8765253235977339509styled-by-prettify=
">;</span></pre><pre><span style=3D"color:#660" class=3D"m_8765253235977339=
509styled-by-prettify">}</span></pre><span style=3D"color:#000" class=3D"m_=
8765253235977339509styled-by-prettify"><br></span><pre><span style=3D"font-=
style:italic;color:#66d9ef"><span style=3D"color:#008" class=3D"m_876525323=
5977339509styled-by-prettify">int</span></span><span style=3D"color:#3e3d32=
"><span style=3D"color:#000" class=3D"m_8765253235977339509styled-by-pretti=
fy"> </span></span><span style=3D"font-weight:600;color:#a6e22e"><span styl=
e=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify">main</sp=
an></span><span style=3D"color:#660" class=3D"m_8765253235977339509styled-b=
y-prettify">()</span><span style=3D"color:#3e3d32"><span style=3D"color:#00=
0" class=3D"m_8765253235977339509styled-by-prettify"> </span></span><span s=
tyle=3D"color:#660" class=3D"m_8765253235977339509styled-by-prettify">{</sp=
an></pre><pre><span style=3D"color:#3e3d32"><span style=3D"color:#000" clas=
s=3D"m_8765253235977339509styled-by-prettify"> =C2=A0 =C2=A0</span></span><=
span style=3D"color:#66d9ef"><span style=3D"color:#000" class=3D"m_87652532=
35977339509styled-by-prettify">vector</span></span><span style=3D"color:#08=
0" class=3D"m_8765253235977339509styled-by-prettify">&lt;</span><span style=
=3D"color:#66d9ef"><span style=3D"color:#080" class=3D"m_876525323597733950=
9styled-by-prettify">string</span></span><span style=3D"color:#080" class=
=3D"m_8765253235977339509styled-by-prettify">&gt;</span><span style=3D"colo=
r:#3e3d32"><span style=3D"color:#000" class=3D"m_8765253235977339509styled-=
by-prettify"> </span></span><span style=3D"color:#e48d27"><span style=3D"co=
lor:#000" class=3D"m_8765253235977339509styled-by-prettify">words</span></s=
pan><span style=3D"color:#3e3d32"><span style=3D"color:#000" class=3D"m_876=
5253235977339509styled-by-prettify"> </span></span><span style=3D"color:#e6=
e5e2"><span style=3D"color:#660" class=3D"m_8765253235977339509styled-by-pr=
ettify">=3D</span></span><span style=3D"color:#3e3d32"><span style=3D"color=
:#000" class=3D"m_8765253235977339509styled-by-prettify"> </span></span><sp=
an style=3D"color:#660" class=3D"m_8765253235977339509styled-by-prettify">{=
</span><span style=3D"color:#e6db74"><span style=3D"color:#080" class=3D"m_=
8765253235977339509styled-by-prettify">&quot;Thousand</span></span><span st=
yle=3D"color:#3e3d32"><span style=3D"color:#080" class=3D"m_876525323597733=
9509styled-by-prettify"> </span></span><span style=3D"color:#e6db74"><span =
style=3D"color:#080" class=3D"m_8765253235977339509styled-by-prettify">Foot=
</span></span><span style=3D"color:#3e3d32"><span style=3D"color:#080" clas=
s=3D"m_8765253235977339509styled-by-prettify"> </span></span><span style=3D=
"color:#e6db74"><span style=3D"color:#080" class=3D"m_8765253235977339509st=
yled-by-prettify">Krutch&quot;</span></span><span style=3D"color:#660" clas=
s=3D"m_8765253235977339509styled-by-prettify">,</span><span style=3D"color:=
#3e3d32"><span style=3D"color:#000" class=3D"m_8765253235977339509styled-by=
-prettify"> </span></span><span style=3D"color:#e6db74"><span style=3D"colo=
r:#080" class=3D"m_8765253235977339509styled-by-prettify">&quot;Nickelback&=
quot;</span></span><span style=3D"color:#660" class=3D"m_876525323597733950=
9styled-by-prettify">,</span><span style=3D"color:#3e3d32"><span style=3D"c=
olor:#000" class=3D"m_8765253235977339509styled-by-prettify"> </span></span=
><span style=3D"color:#e6db74"><span style=3D"color:#080" class=3D"m_876525=
3235977339509styled-by-prettify">&quot;The</span></span><span style=3D"colo=
r:#3e3d32"><span style=3D"color:#080" class=3D"m_8765253235977339509styled-=
by-prettify"> </span></span><span style=3D"color:#e6db74"><span style=3D"co=
lor:#080" class=3D"m_8765253235977339509styled-by-prettify">Rasmus&quot;</s=
pan></span><span style=3D"color:#660" class=3D"m_8765253235977339509styled-=
by-prettify">,</span><span style=3D"color:#3e3d32"><span style=3D"color:#00=
0" class=3D"m_8765253235977339509styled-by-prettify"> </span></span><span s=
tyle=3D"color:#e6db74"><span style=3D"color:#080" class=3D"m_87652532359773=
39509styled-by-prettify">&quot;Aggressiful&quot;</span></span><span style=
=3D"color:#660" class=3D"m_8765253235977339509styled-by-prettify">};</span>=
</pre><pre><span style=3D"color:#3e3d32"><span style=3D"color:#000" class=
=3D"m_8765253235977339509styled-by-prettify"> =C2=A0 =C2=A0</span></span><s=
pan style=3D"color:#a6e22e"><span style=3D"color:#000" class=3D"m_876525323=
5977339509styled-by-prettify">print_container_beautiful</span></span><span =
style=3D"color:#660" class=3D"m_8765253235977339509styled-by-prettify">(</s=
pan><span style=3D"color:#e48d27"><span style=3D"color:#000" class=3D"m_876=
5253235977339509styled-by-prettify">words</span></span><span style=3D"color=
:#e6e5e2"><span style=3D"color:#660" class=3D"m_8765253235977339509styled-b=
y-prettify">.</span></span><span style=3D"color:#a6e22e"><span style=3D"col=
or:#008" class=3D"m_8765253235977339509styled-by-prettify">begin</span></sp=
an><span style=3D"color:#660" class=3D"m_8765253235977339509styled-by-prett=
ify">(),</span><span style=3D"color:#3e3d32"><span style=3D"color:#000" cla=
ss=3D"m_8765253235977339509styled-by-prettify"> </span></span><span style=
=3D"color:#e48d27"><span style=3D"color:#000" class=3D"m_876525323597733950=
9styled-by-prettify">words</span></span><span style=3D"color:#e6e5e2"><span=
 style=3D"color:#660" class=3D"m_8765253235977339509styled-by-prettify">.</=
span></span><span style=3D"color:#a6e22e"><span style=3D"color:#008" class=
=3D"m_8765253235977339509styled-by-prettify">end</span></span><span style=
=3D"color:#660" class=3D"m_8765253235977339509styled-by-prettify">(),</span=
><span style=3D"color:#3e3d32"><span style=3D"color:#000" class=3D"m_876525=
3235977339509styled-by-prettify"> </span></span><span style=3D"font-style:i=
talic;color:#ce5c00"><span style=3D"color:#000" class=3D"m_8765253235977339=
509styled-by-prettify">cout</span></span><span style=3D"color:#660" class=
=3D"m_8765253235977339509styled-by-prettify">,</span><span style=3D"color:#=
3e3d32"><span style=3D"color:#000" class=3D"m_8765253235977339509styled-by-=
prettify"> </span></span><span style=3D"color:#e6db74"><span style=3D"color=
:#080" class=3D"m_8765253235977339509styled-by-prettify">&#39;,&#39;</span>=
</span><span style=3D"color:#660" class=3D"m_8765253235977339509styled-by-p=
rettify">,</span><span style=3D"color:#3e3d32"><span style=3D"color:#000" c=
lass=3D"m_8765253235977339509styled-by-prettify"> </span></span><span style=
=3D"color:#f92672"><span style=3D"color:#008" class=3D"m_876525323597733950=
9styled-by-prettify">false</span></span><span style=3D"color:#660" class=3D=
"m_8765253235977339509styled-by-prettify">);</span><span style=3D"color:#00=
0" class=3D"m_8765253235977339509styled-by-prettify"> </span><span style=3D=
"color:#800" class=3D"m_8765253235977339509styled-by-prettify">// Print in =
console: Thousand Foot Krutch,Nickelback,The Rasmus,Aggressiful</span><span=
 style=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify"><br=
></span><pre><span style=3D"color:#a6e22e"><span style=3D"color:#000" class=
=3D"m_8765253235977339509styled-by-prettify">=C2=A0 =C2=A0 print_container_=
beautiful</span></span><span style=3D"color:#660" class=3D"m_87652532359773=
39509styled-by-prettify">(</span><span style=3D"color:#e48d27"><span style=
=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify">words</sp=
an></span><span style=3D"color:#e6e5e2"><span style=3D"color:#660" class=3D=
"m_8765253235977339509styled-by-prettify">.</span></span><span style=3D"col=
or:#a6e22e"><span style=3D"color:#008" class=3D"m_8765253235977339509styled=
-by-prettify">begin</span></span><span style=3D"color:#660" class=3D"m_8765=
253235977339509styled-by-prettify">(),</span><span style=3D"color:#3e3d32">=
<span style=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify=
"> </span></span><span style=3D"color:#e48d27"><span style=3D"color:#000" c=
lass=3D"m_8765253235977339509styled-by-prettify">words</span></span><span s=
tyle=3D"color:#e6e5e2"><span style=3D"color:#660" class=3D"m_87652532359773=
39509styled-by-prettify">.</span></span><span style=3D"color:#a6e22e"><span=
 style=3D"color:#008" class=3D"m_8765253235977339509styled-by-prettify">end=
</span></span><span style=3D"color:#660" class=3D"m_8765253235977339509styl=
ed-by-prettify">(),</span><span style=3D"color:#3e3d32"><span style=3D"colo=
r:#000" class=3D"m_8765253235977339509styled-by-prettify"> </span></span><s=
pan style=3D"font-style:italic;color:#ce5c00"><span style=3D"color:#000" cl=
ass=3D"m_8765253235977339509styled-by-prettify">cout</span></span><span sty=
le=3D"color:#660" class=3D"m_8765253235977339509styled-by-prettify">,</span=
><span style=3D"color:#3e3d32"><span style=3D"color:#000" class=3D"m_876525=
3235977339509styled-by-prettify"> </span></span><span style=3D"color:#e6db7=
4"><span style=3D"color:#080" class=3D"m_8765253235977339509styled-by-prett=
ify">&#39;,&#39;</span></span><span style=3D"color:#660" class=3D"m_8765253=
235977339509styled-by-prettify">,</span><span style=3D"color:#3e3d32"><span=
 style=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify"> </=
span></span><span style=3D"color:#f92672"><span style=3D"color:#008" class=
=3D"m_8765253235977339509styled-by-prettify">true</span></span><span style=
=3D"color:#660" class=3D"m_8765253235977339509styled-by-prettify">);</span>=
<span style=3D"color:#000" class=3D"m_8765253235977339509styled-by-prettify=
"> </span><span style=3D"color:#800" class=3D"m_8765253235977339509styled-b=
y-prettify">// Print in console: {Thousand Foot Krutch,Nickelback,The Rasmu=
s,Aggressiful}</span></pre></pre><span style=3D"color:#800" class=3D"m_8765=
253235977339509styled-by-prettify">}</span></div></code></div><br><br></div=
></div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/24385a93-ed9f-47a1-8ecb-64e67214d365%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/24385a93-ed9f-=
47a1-8ecb-64e67214d365%40isocpp.org</a>.<br>
</blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAEfefmxCH_XZnG%3D2tDxYgoH6zB5V9%2BBi=
_FTEyM-Guj2YZJNHyA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAEfefmxCH_XZ=
nG%3D2tDxYgoH6zB5V9%2BBi_FTEyM-Guj2YZJNHyA%40mail.gmail.com</a>.<br />

--000000000000944dee05760ecd3c--

.


Author: Avi Kivity <avi@scylladb.com>
Date: Tue, 18 Sep 2018 13:42:51 +0300
Raw View
On 17/09/2018 01.09, Thiago Macieira wrote:
> On Sunday, 16 September 2018 05:06:25 PDT reactor.game@gmail.com wrote:
>> In file:
>> {"Hello", "ofstream!"}
> What if I want a different format? By far, the most common way would be to
> have one string per line, no brackets.
>

Multiple formats are already supported by iostream.


std::cout << std::container_format(std::multiline::yes,
std::multiline::no) << strings << std::endl;



--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/58baaf07-4c7e-e0e4-c76b-a82ee39e7e0e%40scylladb.com.

.