Topic: Counterparts of std::getline functions
Author: Vlad from Moscow <vlad.moscow@mail.ru>
Date: Wed, 1 May 2013 03:14:48 -0700 (PDT)
Raw View
------=_Part_8190_30506739.1367403288799
Content-Type: text/plain; charset=ISO-8859-1
I would like to suggest the following counterparts of std::geline functions
template<class charT, class traits, class Allocator>
basic_istream<charT,traits>&
putline(basic_istream<charT,traits>& is,
const basic_string<charT,traits,Allocator>& str,
charT delim);
template<class charT, class traits, class Allocator>
basic_istream<charT,traits>&
putline(basic_istream<charT,traits>&& is,
const basic_string<charT,traits,Allocator>& str,
charT delim);
template<class charT, class traits, class Allocator>
basic_istream<charT,traits>&
putline(basic_istream<charT,traits>& is,
const basic_string<charT,traits,Allocator>& str);
template<class charT, class traits, class Allocator>
basic_istream<charT,traits>&
putline(basic_istream<charT,traits>&& is,
const basic_string<charT,traits,Allocator>& str);
They are very convinient in most cases instead of manually to insert a
delimiter in a stream with 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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.
------=_Part_8190_30506739.1367403288799
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div>I would like to suggest the following counterparts of std::g=
eline functions</div><div> </div><div>template<class charT, class t=
raits, class Allocator><br>basic_istream<charT,traits>&<br>put=
line(basic_istream<charT,traits>& is,<br>const basic_string<ch=
arT,traits,Allocator>& str,<br>charT delim);<br>template<class ch=
arT, class traits, class Allocator><br>basic_istream<charT,traits>=
&<br>putline(basic_istream<charT,traits>&& is,<br>const b=
asic_string<charT,traits,Allocator>& str,<br>charT delim);<br></d=
iv><div>template<class charT, class traits, class Allocator><br>basic=
_istream<charT,traits>&<br>putline(basic_istream<charT,traits&=
gt;& is,<br>const basic_string<charT,traits,Allocator>& str);=
<br>template<class charT, class traits, class Allocator><br>basic_ist=
ream<charT,traits>&<br>putline(basic_istream<charT,traits>&=
amp;& is,<br>const basic_string<charT,traits,Allocator>& str)=
;</div><div> </div><div>They are very convinient in most cases instead=
of manually to insert a delimiter in a stream with operator <<.</div=
><div> </div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
------=_Part_8190_30506739.1367403288799--
.
Author: Jonathan Wakely <cxx@kayari.org>
Date: Wed, 1 May 2013 05:54:29 -0700 (PDT)
Raw View
------=_Part_401_3292907.1367412869299
Content-Type: text/plain; charset=ISO-8859-1
On Wednesday, May 1, 2013 11:14:48 AM UTC+1, Vlad from Moscow wrote:
>
> I would like to suggest the following counterparts of std::geline functions
>
> template<class charT, class traits, class Allocator>
> basic_istream<charT,traits>&
> putline(basic_istream<charT,traits>& is,
> const basic_string<charT,traits,Allocator>& str,
> charT delim);
> template<class charT, class traits, class Allocator>
> basic_istream<charT,traits>&
> putline(basic_istream<charT,traits>&& is,
> const basic_string<charT,traits,Allocator>& str,
> charT delim);
> template<class charT, class traits, class Allocator>
> basic_istream<charT,traits>&
> putline(basic_istream<charT,traits>& is,
> const basic_string<charT,traits,Allocator>& str);
> template<class charT, class traits, class Allocator>
> basic_istream<charT,traits>&
> putline(basic_istream<charT,traits>&& is,
> const basic_string<charT,traits,Allocator>& str);
>
s/basic_istream/basic_ostream/g
>
> They are very convinient in most cases instead of manually to insert a
> delimiter in a stream with operator <<.
>
What are their semantics? Presumably you intend them to be unformatted
output functions, or do you just want them to do 'is << str << delim;' ?
--
---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.
------=_Part_401_3292907.1367412869299
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<br><br>On Wednesday, May 1, 2013 11:14:48 AM UTC+1, Vlad from Moscow wrote=
:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;bo=
rder-left: 1px #ccc solid;padding-left: 1ex;"><div>I would like to suggest&=
nbsp;the following counterparts of std::geline functions</div><div>&nb=
sp;</div><div>template<class charT, class traits, class Allocator><br=
>basic_istream<charT,traits>&<br>putline(basic_istream<charT,<=
wbr>traits>& is,<br>const basic_string<charT,traits,<wbr>Allocato=
r>& str,<br>charT delim);<br>template<class charT, class traits, =
class Allocator><br>basic_istream<charT,traits>&<br>putline(ba=
sic_istream<charT,<wbr>traits>&& is,<br>const basic_string<=
;charT,traits,<wbr>Allocator>& str,<br>charT delim);<br></div><div>t=
emplate<class charT, class traits, class Allocator><br>basic_istream&=
lt;charT,traits>&<br>putline(basic_istream<charT,<wbr>traits>&=
amp; is,<br>const basic_string<charT,traits,<wbr>Allocator>& str)=
;<br>template<class charT, class traits, class Allocator><br>basic_is=
tream<charT,traits>&<br>putline(basic_istream<charT,<wbr>trait=
s>&& is,<br>const basic_string<charT,traits,<wbr>Allocator>=
;& str);</div></blockquote><div><br>s/basic_istream/basic_ostream/g<br>=
</div><blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-lef=
t: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div> <br></div><d=
iv>They are very convinient in most cases instead of manually to insert a d=
elimiter in a stream with operator <<.</div></blockquote><div><br>Wha=
t are their semantics? Presumably you intend them to be unformatted o=
utput functions, or do you just want them to do 'is << str << d=
elim;' ?<br><br> </div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
------=_Part_401_3292907.1367412869299--
.
Author: Vlad from Moscow <vlad.moscow@mail.ru>
Date: Wed, 1 May 2013 06:03:09 -0700 (PDT)
Raw View
------=_Part_842_24353311.1367413389847
Content-Type: text/plain; charset=ISO-8859-1
On Wednesday, May 1, 2013 4:54:29 PM UTC+4, Jonathan Wakely wrote:
>
>
>
> On Wednesday, May 1, 2013 11:14:48 AM UTC+1, Vlad from Moscow wrote:
>>
>> I would like to suggest the following counterparts of std::geline
>> functions
>>
>> template<class charT, class traits, class Allocator>
>> basic_istream<charT,traits>&
>> putline(basic_istream<charT,traits>& is,
>> const basic_string<charT,traits,Allocator>& str,
>> charT delim);
>> template<class charT, class traits, class Allocator>
>> basic_istream<charT,traits>&
>> putline(basic_istream<charT,traits>&& is,
>> const basic_string<charT,traits,Allocator>& str,
>> charT delim);
>> template<class charT, class traits, class Allocator>
>> basic_istream<charT,traits>&
>> putline(basic_istream<charT,traits>& is,
>> const basic_string<charT,traits,Allocator>& str);
>> template<class charT, class traits, class Allocator>
>> basic_istream<charT,traits>&
>> putline(basic_istream<charT,traits>&& is,
>> const basic_string<charT,traits,Allocator>& str);
>>
>
> s/basic_istream/basic_ostream/g
>
>
>>
>> They are very convinient in most cases instead of manually to insert a
>> delimiter in a stream with operator <<.
>>
>
> What are their semantics? Presumably you intend them to be unformatted
> output functions, or do you just want them to do 'is << str << delim;' ?
>
>
As I am considering them as counterparts of std::getline functions then
they should be also unformatted output functions that the result of for
example the chain
std::getline( io_stream, s ), std::putline( io_stream, s ), std::getline(
io_stream, s );
would be the same at the beginning and at the end of it.
>
>
--
---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.
------=_Part_842_24353311.1367413389847
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<br>On Wednesday, May 1, 2013 4:54:29 PM UTC+4, Jonathan Wakely wrote:<bloc=
kquote style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-c=
olor: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;=
" class=3D"gmail_quote"><br><br>On Wednesday, May 1, 2013 11:14:48 AM UTC+1=
, Vlad from Moscow wrote:<blockquote style=3D"margin: 0px 0px 0px 0.8ex; pa=
dding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: =
1px; border-left-style: solid;" class=3D"gmail_quote"><div>I would like to =
suggest the following counterparts of std::geline functions</div>=
<div> </div><div>template<class charT, class traits, class Allocato=
r><br>basic_istream<charT,traits>&<br>putline(basic_istream<=
;charT,<wbr>traits>& is,<br>const basic_string<charT,traits,<wbr>=
Allocator>& str,<br>charT delim);<br>template<class charT, class =
traits, class Allocator><br>basic_istream<charT,traits>&<br>pu=
tline(basic_istream<charT,<wbr>traits>&& is,<br>const basic_s=
tring<charT,traits,<wbr>Allocator>& str,<br>charT delim);<br></di=
v><div>template<class charT, class traits, class Allocator><br>basic_=
istream<charT,traits>&<br>putline(basic_istream<charT,<wbr>tra=
its>& is,<br>const basic_string<charT,traits,<wbr>Allocator>&a=
mp; str);<br>template<class charT, class traits, class Allocator><br>=
basic_istream<charT,traits>&<br>putline(basic_istream<charT,<w=
br>traits>&& is,<br>const basic_string<charT,traits,<wbr>Allo=
cator>& str);</div></blockquote><div><br>s/basic_istream/basic_ostre=
am/<wbr>g<br> </div><blockquote style=3D"margin: 0px 0px 0px 0.8ex; pa=
dding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: =
1px; border-left-style: solid;" class=3D"gmail_quote"><div> <br></div><div>=
They are very convinient in most cases instead of manually to insert a deli=
miter in a stream with operator <<.</div></blockquote><div><br>What a=
re their semantics? Presumably you intend them to be unformatted outp=
ut functions, or do you just want them to do 'is << str << deli=
m;' ?<br><br></div></blockquote><div> </div><div>As I am considering t=
hem as counterparts of std::getline functions then they should be=
also unformatted output functions that the result of for example the chain=
</div><div> </div><div>std::getline( io_stream, s ), std::putline=
( io_stream, s ), std::getline( io_stream, s );</div><div> </div>=
<div>would be the same at the beginning and at the end of it.</div><blockqu=
ote style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-colo=
r: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" c=
lass=3D"gmail_quote"><div> </div></blockquote>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
------=_Part_842_24353311.1367413389847--
.
Author: cornedbee@google.com
Date: Thu, 2 May 2013 02:12:39 -0700 (PDT)
Raw View
------=_Part_177_8731077.1367485959806
Content-Type: text/plain; charset=ISO-8859-1
On Wednesday, May 1, 2013 3:03:09 PM UTC+2, Vlad from Moscow wrote:
>
> As I am considering them as counterparts of std::getline functions then
> they should be also unformatted output functions that the result of for
> example the chain
>
> std::getline( io_stream, s ), std::putline( io_stream, s ), std::getline(
> io_stream, s );
>
> would be the same at the beginning and at the end of it.
>
What does that mean? Do you mean to say that putline should not only output
the string, but also act as an arbitrary-size putback function so that the
next input call reads what was written back in?
--
---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.
------=_Part_177_8731077.1367485959806
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<br><br>On Wednesday, May 1, 2013 3:03:09 PM UTC+2, Vlad from Moscow wrote:=
<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;bor=
der-left: 1px #ccc solid;padding-left: 1ex;">As I am considering them as&nb=
sp;counterparts of std::getline functions then they should be also unf=
ormatted output functions that the result of for example the chain<br><div>=
</div><div>std::getline( io_stream, s ), std::putline( io_stream=
, s ), std::getline( io_stream, s );</div><div> </div><div>would =
be the same at the beginning and at the end of it.</div></blockquote><div><=
br></div><div>What does that mean? Do you mean to say that putline should n=
ot only output the string, but also act as an arbitrary-size putback functi=
on so that the next input call reads what was written back in? </div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
------=_Part_177_8731077.1367485959806--
.
Author: Vlad from Moscow <vlad.moscow@mail.ru>
Date: Thu, 2 May 2013 03:48:52 -0700 (PDT)
Raw View
------=_Part_5797_30980349.1367491733000
Content-Type: text/plain; charset=ISO-8859-1
On Thursday, May 2, 2013 1:12:39 PM UTC+4, corn...@google.com wrote:
>
>
>
> On Wednesday, May 1, 2013 3:03:09 PM UTC+2, Vlad from Moscow wrote:
>>
>> As I am considering them as counterparts of std::getline functions then
>> they should be also unformatted output functions that the result of for
>> example the chain
>>
>> std::getline( io_stream, s ), std::putline( io_stream, s ), std::getline(
>> io_stream, s );
>>
>> would be the same at the beginning and at the end of it.
>>
>
> What does that mean? Do you mean to say that putline should not only
> output the string, but also act as an arbitrary-size putback function so
> that the next input call reads what was written back in?
>
>
I meant a simple line by line method of coping data from one stream into
another stream that the result would be an identical copy of the original
data
For example
std::ofstream out( MyFile );
std::string line;
while ( std::getline( std::cin, line ) && std::putline( out, line ) );.
--
---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.
------=_Part_5797_30980349.1367491733000
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<br>On Thursday, May 2, 2013 1:12:39 PM UTC+4, corn...@google.com wrote:<bl=
ockquote style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left=
-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: soli=
d;" class=3D"gmail_quote"><br><br>On Wednesday, May 1, 2013 3:03:09 PM UTC+=
2, Vlad from Moscow wrote:<blockquote style=3D"margin: 0px 0px 0px 0.8ex; p=
adding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width:=
1px; border-left-style: solid;" class=3D"gmail_quote">As I am considering =
them as counterparts of std::getline functions then they should b=
e also unformatted output functions that the result of for example the chai=
n<br><div> </div><div>std::getline( io_stream, s ), std::putline(=
io_stream, s ), std::getline( io_stream, s );</div><div> </div><=
div>would be the same at the beginning and at the end of it.</div></blockqu=
ote><div><br></div><div>What does that mean? Do you mean to say that putlin=
e should not only output the string, but also act as an arbitrary-size putb=
ack function so that the next input call reads what was written back in?&nb=
sp;</div><div> </div></blockquote><div> </div><div>I meant a simp=
le line by line method of coping data from one stream into another str=
eam that the result would be an identical copy of the original data</d=
iv><div>For example</div><div> </div><div>std::ofstream out( MyFile );=
</div><div>std::string line;</div><div> </div><div>while ( std::getlin=
e( std::cin, line ) && std::putline( out, line ) );. </div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
------=_Part_5797_30980349.1367491733000--
.
Author: cornedbee@google.com
Date: Thu, 2 May 2013 05:11:47 -0700 (PDT)
Raw View
------=_Part_232_4372676.1367496707666
Content-Type: text/plain; charset=ISO-8859-1
On Thursday, May 2, 2013 12:48:52 PM UTC+2, Vlad from Moscow wrote:
>
> I meant a simple line by line method of coping data from one stream into
> another stream that the result would be an identical copy of the original
> data
> For example
>
> std::ofstream out( MyFile );
> std::string line;
>
> while ( std::getline( std::cin, line ) && std::putline( out, line ) );.
>
Then I have to repeat Jonathan's question. What, aside from syntactic
symmetry, is the advantage over
while (std::getline(std::cin, line) && std::cout << line << '\n');
--
---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.
------=_Part_232_4372676.1367496707666
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Thursday, May 2, 2013 12:48:52 PM UTC+2, Vlad from Moscow wrote:<br><blo=
ckquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-=
left: 1px #ccc solid;padding-left: 1ex;"> <br><div>I meant a simple li=
ne by line method of coping data from one stream into another stream t=
hat the result would be an identical copy of the original data</div><d=
iv>For example</div><div> </div><div>std::ofstream out( MyFile );</div=
><div>std::string line;</div><div> </div><div>while ( std::getline( st=
d::cin, line ) && std::putline( out, line ) );. </div></blockq=
uote><div><br></div><div>Then I have to repeat Jonathan's question. What, a=
side from syntactic symmetry, is the advantage over</div><div><br></div><di=
v>while (std::getline(std::cin, line) && std::cout << line &l=
t;< '\n');</div><div> </div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
------=_Part_232_4372676.1367496707666--
.
Author: Nicol Bolas <jmckesson@gmail.com>
Date: Thu, 2 May 2013 05:46:18 -0700 (PDT)
Raw View
------=_Part_659_30701094.1367498778139
Content-Type: text/plain; charset=ISO-8859-1
On Thursday, May 2, 2013 5:11:47 AM UTC-7, corn...@google.com wrote:
>
> On Thursday, May 2, 2013 12:48:52 PM UTC+2, Vlad from Moscow wrote:
>
>>
>> I meant a simple line by line method of coping data from one stream into
>> another stream that the result would be an identical copy of the original
>> data
>> For example
>>
>> std::ofstream out( MyFile );
>> std::string line;
>>
>> while ( std::getline( std::cin, line ) && std::putline( out, line ) );.
>>
>
> Then I have to repeat Jonathan's question. What, aside from syntactic
> symmetry, is the advantage over
>
> while (std::getline(std::cin, line) && std::cout << line << '\n');
>
>
It should also be noted that `std::getline` also has overloads that have a
third parameter: the delimiter that defines a "line". Should we have those
too for the sake of "symmerty"?
--
---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.
------=_Part_659_30701094.1367498778139
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Thursday, May 2, 2013 5:11:47 AM UTC-7, corn...@google.com wrote:<blockq=
uote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-lef=
t: 1px #ccc solid;padding-left: 1ex;">On Thursday, May 2, 2013 12:48:52 PM =
UTC+2, Vlad from Moscow wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"=
> <br><div>I meant a simple line by line method of coping data fr=
om one stream into another stream that the result would be an identica=
l copy of the original data</div><div>For example</div><div> </div><di=
v>std::ofstream out( MyFile );</div><div>std::string line;</div><div> =
</div><div>while ( std::getline( std::cin, line ) && std::putline( =
out, line ) );. </div></blockquote><div><br></div><div>Then I have to =
repeat Jonathan's question. What, aside from syntactic symmetry, is the adv=
antage over</div><div><br></div><div>while (std::getline(std::cin, line) &a=
mp;& std::cout << line << '\n');</div><div> </div></bl=
ockquote><div><br>It should also be noted that `std::getline` also has over=
loads that have a third parameter: the delimiter that defines a "line". Sho=
uld we have those too for the sake of "symmerty"?<br></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
------=_Part_659_30701094.1367498778139--
.
Author: Vlad from Moscow <vlad.moscow@mail.ru>
Date: Thu, 2 May 2013 06:35:35 -0700 (PDT)
Raw View
------=_Part_5743_22355567.1367501735997
Content-Type: text/plain; charset=ISO-8859-1
On Thursday, May 2, 2013 4:46:18 PM UTC+4, Nicol Bolas wrote:
>
> On Thursday, May 2, 2013 5:11:47 AM UTC-7, corn...@google.com wrote:
>>
>> On Thursday, May 2, 2013 12:48:52 PM UTC+2, Vlad from Moscow wrote:
>>
>>>
>>> I meant a simple line by line method of coping data from one stream into
>>> another stream that the result would be an identical copy of the original
>>> data
>>> For example
>>>
>>> std::ofstream out( MyFile );
>>> std::string line;
>>>
>>> while ( std::getline( std::cin, line ) && std::putline( out, line ) );.
>>>
>>
>> Then I have to repeat Jonathan's question. What, aside from syntactic
>> symmetry, is the advantage over
>>
>> while (std::getline(std::cin, line) && std::cout << line << '\n');
>>
>>
>
> It should also be noted that `std::getline` also has overloads that have a
> third parameter: the delimiter that defines a "line". Should we have those
> too for the sake of "symmerty"?
>
In the first post I showed all overloaded functions including functions
with the third parameter. So that it would be more clear I rewrite my
simple example as
while ( std::getline( std::cin, line ) && std::putline( out, line, ';' )
);.
--
---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.
------=_Part_5743_22355567.1367501735997
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<br>On Thursday, May 2, 2013 4:46:18 PM UTC+4, Nicol Bolas wrote:<blockquot=
e style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color:=
rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" cla=
ss=3D"gmail_quote">On Thursday, May 2, 2013 5:11:47 AM UTC-7, <a>corn...@go=
ogle.com</a> wrote:<blockquote style=3D"margin: 0px 0px 0px 0.8ex; padding-=
left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; b=
order-left-style: solid;" class=3D"gmail_quote">On Thursday, May 2, 2013 12=
:48:52 PM UTC+2, Vlad from Moscow wrote:<br><blockquote style=3D"margin: 0p=
x 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); =
border-left-width: 1px; border-left-style: solid;" class=3D"gmail_quote">&n=
bsp;<br><div>I meant a simple line by line method of coping data from =
one stream into another stream that the result would be an identical c=
opy of the original data</div><div>For example</div><div> </div><div>s=
td::ofstream out( MyFile );</div><div>std::string line;</div><div> </d=
iv><div>while ( std::getline( std::cin, line ) && std::putline( out=
, line ) );. </div></blockquote><div><br></div><div>Then I have to rep=
eat Jonathan's question. What, aside from syntactic symmetry, is the advant=
age over</div><div><br></div><div>while (std::getline(std::cin, line) &=
& std::cout << line << '\n');</div><div> </div></block=
quote><div><br>It should also be noted that `std::getline` also has overloa=
ds that have a third parameter: the delimiter that defines a "line". Should=
we have those too for the sake of "symmerty"?<br></div></blockquote><div>&=
nbsp;</div><div>In the first post I showed all overloaded functions includi=
ng functions with the third parameter. So that it would be more clear I rew=
rite my simple example as</div><div> </div><div>while ( std::getline( =
std::cin, line ) && std::putline( out, line, ';' ) );. </div><=
div> </div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
------=_Part_5743_22355567.1367501735997--
.
Author: Vlad from Moscow <vlad.moscow@mail.ru>
Date: Thu, 2 May 2013 06:58:43 -0700 (PDT)
Raw View
------=_Part_15_28135796.1367503123157
Content-Type: text/plain; charset=ISO-8859-1
On Thursday, May 2, 2013 4:11:47 PM UTC+4, corn...@google.com wrote:
>
> On Thursday, May 2, 2013 12:48:52 PM UTC+2, Vlad from Moscow wrote:
>
>>
>> I meant a simple line by line method of coping data from one stream into
>> another stream that the result would be an identical copy of the original
>> data
>> For example
>>
>> std::ofstream out( MyFile );
>> std::string line;
>>
>> while ( std::getline( std::cin, line ) && std::putline( out, line ) );.
>>
>
> Then I have to repeat Jonathan's question. What, aside from syntactic
> symmetry, is the advantage over
>
> while (std::getline(std::cin, line) && std::cout << line << '\n');
>
>
Such functions are easy to use as parameters of for example functional
objects.
>
>
>
--
---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.
------=_Part_15_28135796.1367503123157
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<br>On Thursday, May 2, 2013 4:11:47 PM UTC+4, corn...@google.com wrote:<bl=
ockquote style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left=
-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: soli=
d;" class=3D"gmail_quote">On Thursday, May 2, 2013 12:48:52 PM UTC+2, Vlad =
from Moscow wrote:<br><blockquote style=3D"margin: 0px 0px 0px 0.8ex; paddi=
ng-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px=
; border-left-style: solid;" class=3D"gmail_quote"> <br><div>I meant a=
simple line by line method of coping data from one stream into anothe=
r stream that the result would be an identical copy of the original da=
ta</div><div>For example</div><div> </div><div>std::ofstream out( MyFi=
le );</div><div>std::string line;</div><div> </div><div>while ( std::g=
etline( std::cin, line ) && std::putline( out, line ) );. </di=
v></blockquote><div><br></div><div>Then I have to repeat Jonathan's questio=
n. What, aside from syntactic symmetry, is the advantage over</div><div><br=
></div><div>while (std::getline(std::cin, line) && std::cout <&l=
t; line << '\n');</div><div> </div></blockquote><div>Such functi=
ons are easy to use as parameters of for example functional objects. <=
/div><blockquote style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; bor=
der-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-sty=
le: solid;" class=3D"gmail_quote"><div> </div></blockquote><blockquote=
style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: =
rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" clas=
s=3D"gmail_quote"><div> </div></blockquote>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
------=_Part_15_28135796.1367503123157--
.
Author: cornedbee@google.com
Date: Thu, 2 May 2013 07:05:51 -0700 (PDT)
Raw View
------=_Part_24_25911901.1367503552095
Content-Type: text/plain; charset=ISO-8859-1
On Thursday, May 2, 2013 3:58:43 PM UTC+2, Vlad from Moscow wrote:
>
>
> On Thursday, May 2, 2013 4:11:47 PM UTC+4, corn...@google.com wrote:
>>
>> Then I have to repeat Jonathan's question. What, aside from syntactic
>> symmetry, is the advantage over
>>
>> while (std::getline(std::cin, line) && std::cout << line << '\n');
>>
>>
> Such functions are easy to use as parameters of for example functional
> objects.
>
>>
>>
They're overloaded or have default arguments. That makes them very hard to
use as parameters for generic functional objects.
--
---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.
------=_Part_24_25911901.1367503552095
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<br><br>On Thursday, May 2, 2013 3:58:43 PM UTC+2, Vlad from Moscow wrote:<=
blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;bord=
er-left: 1px #ccc solid;padding-left: 1ex;"><br>On Thursday, May 2, 2013 4:=
11:47 PM UTC+4, <a>corn...@google.com</a> wrote:<blockquote style=3D"margin=
:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);bord=
er-left-width:1px;border-left-style:solid" class=3D"gmail_quote"><div>Then =
I have to repeat Jonathan's question. What, aside from syntactic symmetry, =
is the advantage over</div><div><br></div><div>while (std::getline(std::cin=
, line) && std::cout << line << '\n');</div><div> =
</div></blockquote><div>Such functions are easy to use as parameters of for=
example functional objects. </div><blockquote style=3D"margin:0px 0px=
0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-=
width:1px;border-left-style:solid" class=3D"gmail_quote"><br></blockquote><=
/blockquote><div><br></div><div>They're overloaded or have default argument=
s. That makes them very hard to use as parameters for generic functional ob=
jects.</div><div> </div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
------=_Part_24_25911901.1367503552095--
.