Topic: n3553 - Swap operator proposal
Author: Sean Hunt <scshunt@csclub.uwaterloo.ca>
Date: Tue, 19 Mar 2013 21:25:27 -0700 (PDT)
Raw View
------=_Part_1463_10790256.1363753527577
Content-Type: text/plain; charset=ISO-8859-1
I very much like this proposal, but I think that :=: should be implicitly
protected for polymorphic types; modern compiler technology is good enough
to provide a sensible diagnostic in this case and suggest defaulting. I
think that this would be a lot more likely to accidentally arise than
slicing in construction, given that it's an operator, and less harm would
come from requiring it to be explicit.
Actually, on second thought, that would wreak havoc with derived classes
that wanted to implement it. Maybe we need a new class of special
definition "protected default" where it's deleted except to implement an
explicitly defaulted version in a subclass :P
Sean
--
---
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_1463_10790256.1363753527577
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I very much like this proposal, but I think that :=3D: should be implicitly=
protected for polymorphic types; modern compiler technology is good enough=
to provide a sensible diagnostic in this case and suggest defaulting. I th=
ink that this would be a lot more likely to accidentally arise than slicing=
in construction, given that it's an operator, and less harm would come fro=
m requiring it to be explicit.<div><br></div><div>Actually, on second thoug=
ht, that would wreak havoc with derived classes that wanted to implement it=
.. Maybe we need a new class of special definition "protected default" where=
it's deleted except to implement an explicitly defaulted version=
in a subclass :P<br><div><br><div>Sean</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_1463_10790256.1363753527577--
.
Author: Michael Hsieh <michael.liberty.hsieh@gmail.com>
Date: Thu, 18 Apr 2013 20:19:50 -0700 (PDT)
Raw View
------=_Part_339_20478865.1366341590795
Content-Type: text/plain; charset=ISO-8859-1
I think the symbol "<=>" is more suitable for swap 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_339_20478865.1366341590795
Content-Type: text/html; charset=ISO-8859-1
I think the symbol "<=>" is more suitable for swap operator.<br>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email 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="http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en">http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en</a>.<br />
<br />
<br />
------=_Part_339_20478865.1366341590795--
.
Author: morwenn29@gmail.com
Date: Thu, 18 Apr 2013 23:23:22 -0700 (PDT)
Raw View
------=_Part_176_10364277.1366352602610
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Le vendredi 19 avril 2013 05:19:50 UTC+2, Michael Hsieh a =E9crit :
>
> I think the symbol "<=3D>" is more suitable for swap operator.
>
This <=3D> already exists in several other languages (Perl, Groovy, Ruby) a=
nd=20
is called "spaceship operator". It is used to perform a three-way=20
comparison between its right and left operands.
Therefore, I think it would only be confusing to use it for swap.
On the other hand, :=3D: closely reminds me of :=3D which is used for=20
assignment in many programming languages. I think it describes perfectly=20
the "assign left to right and right to left" of the
swap operation.
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/?hl=3Den.
------=_Part_176_10364277.1366352602610
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Le vendredi 19 avril 2013 05:19:50 UTC+2, Michael Hsieh a =E9crit :<bl=
ockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border=
-left: 1px #ccc solid;padding-left: 1ex;">I think the symbol "<=3D>" =
is more suitable for swap operator.<br></blockquote><div>This <=3D> a=
lready exists in several other languages (Perl, Groovy, Ruby) and is called=
"spaceship operator". It is used to perform a three-way comparison b=
etween its right and left operands.<br>Therefore, I think it would only be =
confusing to use it for swap.<br><br>On the other hand, :=3D: closely remin=
ds me of :=3D which is used for assignment in many programming languages. I=
think it describes perfectly the "assign left to right and right to left" =
of the<br>swap operation.<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_176_10364277.1366352602610--
.
Author: Evgeny Panasyuk <evgeny.panasyuk@gmail.com>
Date: Fri, 19 Apr 2013 12:15:24 +0400
Raw View
19.04.2013 7:19, Michael Hsieh:
> I think the symbol "<=>" is more suitable for swap operator.
I think variadic function is much more suitable.
Usually swap between two values is 3 copy/move assignments.
Swapping of N values using v1 :=: v2 :=: ... :=: vN would require
(N-1)*3 assignments.
But using variadic function it becomes: cycle(v1,v2,...,vN) with N+1
assignments. (refer http://www.stepanovpapers.com/notes.pdf)
--
Evgeny Panasyuk
--
---
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.
.
Author: Michael Hsieh <michael.liberty.hsieh@gmail.com>
Date: Fri, 19 Apr 2013 05:11:17 -0700 (PDT)
Raw View
------=_Part_630_26087830.1366373477560
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I think "<>" is a much better choice even if what you say is true. But we=
=20
are not talk about other languages. If people so easy confused, they'd=20
better stay away from C++, because there are plenty of things in C++ will=
=20
confuse them. Every time I saw ":=3D" I just wonder how could this be an=20
assignment operator. And that's why I don't think ":=3D:" is a swap operato=
r.
On Friday, April 19, 2013 2:23:22 PM UTC+8, morw...@gmail.com wrote:
>
> Le vendredi 19 avril 2013 05:19:50 UTC+2, Michael Hsieh a =E9crit :
>>
>> I think the symbol "<=3D>" is more suitable for swap operator.
>>
> This <=3D> already exists in several other languages (Perl, Groovy, Ruby)=
=20
> and is called "spaceship operator". It is used to perform a three-way=20
> comparison between its right and left operands.
> Therefore, I think it would only be confusing to use it for swap.
>
> On the other hand, :=3D: closely reminds me of :=3D which is used for=20
> assignment in many programming languages. I think it describes perfectly=
=20
> the "assign left to right and right to left" of the
> swap operation.
>
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/?hl=3Den.
------=_Part_630_26087830.1366373477560
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I think "<>" is a much better choice even if what you say is true. Bu=
t we are not talk about other languages. If people so easy confused, they'd=
better stay away from C++, because there are plenty of things in C++ will =
confuse them. Every time I saw ":=3D" I just wonder how could thi=
s be an assignment operator. And that's why I don't think ":=3D:" is a swap=
operator.<br><br>On Friday, April 19, 2013 2:23:22 PM UTC+8, morw...@gmail=
..com wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left=
: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Le vendredi 19 avri=
l 2013 05:19:50 UTC+2, Michael Hsieh a =E9crit :<blockquote class=3D"g=
mail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;=
padding-left:1ex">I think the symbol "<=3D>" is more suitable for swa=
p operator.<br></blockquote><div>This <=3D> already exists in several=
other languages (Perl, Groovy, Ruby) and is called "spaceship operator". I=
t is used to perform a three-way comparison between its right and lef=
t operands.<br>Therefore, I think it would only be confusing to use it for =
swap.<br><br>On the other hand, :=3D: closely reminds me of :=3D which is u=
sed for assignment in many programming languages. I think it describes perf=
ectly the "assign left to right and right to left" of the<br>swap operation=
..<br></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_630_26087830.1366373477560--
.
Author: Michael Hsieh <michael.liberty.hsieh@gmail.com>
Date: Fri, 19 Apr 2013 05:18:43 -0700 (PDT)
Raw View
------=_Part_650_5273759.1366373923360
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Edit: Sorry. "<>" may not be a choice because it will confuse people *in C+=
+
*.
On Friday, April 19, 2013 8:11:17 PM UTC+8, Michael Hsieh wrote:
>
> I think "<>" is a much better choice even if what you say is true. But we=
=20
> are not talk about other languages. If people so easy confused, they'd=20
> better stay away from C++, because there are plenty of things in C++ will=
=20
> confuse them. Every time I saw ":=3D" I just wonder how could this be an=
=20
> assignment operator. And that's why I don't think ":=3D:" is a swap opera=
tor.
>
> On Friday, April 19, 2013 2:23:22 PM UTC+8, morw...@gmail.com wrote:
>>
>> Le vendredi 19 avril 2013 05:19:50 UTC+2, Michael Hsieh a =E9crit :
>>>
>>> I think the symbol "<=3D>" is more suitable for swap operator.
>>>
>> This <=3D> already exists in several other languages (Perl, Groovy, Ruby=
)=20
>> and is called "spaceship operator". It is used to perform a three-way=
=20
>> comparison between its right and left operands.
>> Therefore, I think it would only be confusing to use it for swap.
>>
>> On the other hand, :=3D: closely reminds me of :=3D which is used for=20
>> assignment in many programming languages. I think it describes perfectly=
=20
>> the "assign left to right and right to left" of the
>> swap operation.
>>
>
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/?hl=3Den.
------=_Part_650_5273759.1366373923360
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Edit: Sorry. "<>" may not be a choice because it will confuse people =
<b>in C++</b>.<br><br>On Friday, April 19, 2013 8:11:17 PM UTC+8, Michael H=
sieh wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left=
: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">I think "<>" =
is a much better choice even if what you say is true. But we are not talk a=
bout other languages. If people so easy confused, they'd better stay away f=
rom C++, because there are plenty of things in C++ will confuse them. =
Every time I saw ":=3D" I just wonder how could this be an assignment =
operator. And that's why I don't think ":=3D:" is a swap operator.<br><br>O=
n Friday, April 19, 2013 2:23:22 PM UTC+8, <a>morw...@gmail.com</a> wrote:<=
blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border=
-left:1px #ccc solid;padding-left:1ex">Le vendredi 19 avril 2013 05:19:50 U=
TC+2, Michael Hsieh a =E9crit :<blockquote class=3D"gmail_quote" style=
=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"=
>I think the symbol "<=3D>" is more suitable for swap operator.<br></=
blockquote><div>This <=3D> already exists in several other languages =
(Perl, Groovy, Ruby) and is called "spaceship operator". It is used t=
o perform a three-way comparison between its right and left operands.<br>Th=
erefore, I think it would only be confusing to use it for swap.<br><br>On t=
he other hand, :=3D: closely reminds me of :=3D which is used for assignmen=
t in many programming languages. I think it describes perfectly the "assign=
left to right and right to left" of the<br>swap operation.<br></div></bloc=
kquote></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_650_5273759.1366373923360--
.
Author: Chris Jefferson <chris@bubblescope.net>
Date: Fri, 19 Apr 2013 16:16:04 +0100
Raw View
On 19/04/13 13:11, Michael Hsieh wrote:
> I think "<>" is a much better choice even if what you say is true. But
> we are not talk about other languages. If people so easy confused,
> they'd better stay away from C++, because there are plenty of things
> in C++ will confuse them. Every time I saw ":=" I just wonder how
> could this be an assignment operator. And that's why I don't think
> ":=:" is a swap operator.
a<>b already means something in C++, it means "create a variable b, of
type a (where a is a templated type where all parameters have a default
value)."
Chris
--
---
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.
.
Author: Michael Hsieh <michael.liberty.hsieh@gmail.com>
Date: Fri, 19 Apr 2013 19:14:36 -0700 (PDT)
Raw View
------=_Part_133_5204942.1366424076622
Content-Type: text/plain; charset=ISO-8859-1
It's still can be a valid operator. Just as I said, It's a bad choice only
because it will confuse the programmer who code in C++.
On Friday, April 19, 2013 11:16:04 PM UTC+8, Chris Jefferson wrote:
>
> On 19/04/13 13:11, Michael Hsieh wrote:
> > I think "<>" is a much better choice even if what you say is true. But
> > we are not talk about other languages. If people so easy confused,
> > they'd better stay away from C++, because there are plenty of things
> > in C++ will confuse them. Every time I saw ":=" I just wonder how
> > could this be an assignment operator. And that's why I don't think
> > ":=:" is a swap operator.
>
> a<>b already means something in C++, it means "create a variable b, of
> type a (where a is a templated type where all parameters have a default
> value)."
>
> Chris
>
--
---
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_133_5204942.1366424076622
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
It's still can be a valid operator. Just as I said, It's a bad choice only =
because it will confuse the programmer who code in C++. <br><br>On Fri=
day, April 19, 2013 11:16:04 PM UTC+8, Chris Jefferson wrote:<blockquote cl=
ass=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px =
#ccc solid;padding-left: 1ex;">On 19/04/13 13:11, Michael Hsieh wrote:
<br>> I think "<>" is a much better choice even if what you say is=
true. But=20
<br>> we are not talk about other languages. If people so easy confused,=
=20
<br>> they'd better stay away from C++, because there are plenty of thin=
gs=20
<br>> in C++ will confuse them. Every time I saw ":=3D" I just wonder ho=
w=20
<br>> could this be an assignment operator. And that's why I don't think=
=20
<br>> ":=3D:" is a swap operator.
<br>
<br>a<>b already means something in C++, it means "create a variable =
b, of=20
<br>type a (where a is a templated type where all parameters have a default=
=20
<br>value)."
<br>
<br>Chris
<br></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_133_5204942.1366424076622--
.
Author: DeadMG <wolfeinstein@gmail.com>
Date: Sat, 20 Apr 2013 00:35:07 -0700 (PDT)
Raw View
------=_Part_386_16702684.1366443307794
Content-Type: text/plain; charset=ISO-8859-1
This proposal is just a bad idea. The only thing wrong with our existing
swap mechanisms are the difficulties of ADL, suffered by *all* such
functionality. Special-casing swap is not an enticing prospect.
--
---
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_386_16702684.1366443307794
Content-Type: text/html; charset=ISO-8859-1
This proposal is just a bad idea. The only thing wrong with our existing swap mechanisms are the difficulties of ADL, suffered by *all* such functionality. Special-casing swap is not an enticing prospect.
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email 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="http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en">http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en</a>.<br />
<br />
<br />
------=_Part_386_16702684.1366443307794--
.
Author: "Andrew C. Morrow" <andrew.c.morrow@gmail.com>
Date: Sat, 20 Apr 2013 13:08:07 -0400
Raw View
--001a11c38e9a28919404dacde17d
Content-Type: text/plain; charset=ISO-8859-1
While we are talking about ADL and swap: was N3619, my proposal for
std::is_swappable and std::is_nothrow_swappable, discussed at all at the
Bristol meeting? I was unable to attend or to find an advocate for the
paper. I understand that means that it was unlikely to be considered, but
I'm still curious.
Thanks,
Andrew
On Sat, Apr 20, 2013 at 3:35 AM, DeadMG <wolfeinstein@gmail.com> wrote:
> This proposal is just a bad idea. The only thing wrong with our existing
> swap mechanisms are the difficulties of ADL, suffered by *all* such
> functionality. Special-casing swap is not an enticing prospect.
>
> --
>
> ---
> 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.
>
>
>
--
---
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.
--001a11c38e9a28919404dacde17d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><div>While we are talking about ADL and swap: was N361=
9, my proposal for std::is_swappable and std::is_nothrow_swappable, discuss=
ed at all at the Bristol meeting? I was unable to attend or to find an advo=
cate for the paper. I understand that means that it was unlikely to be cons=
idered, but I'm still curious.</div>
<div><br></div><div style>Thanks,</div><div style>Andrew</div><div style><b=
r></div></div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote"=
>On Sat, Apr 20, 2013 at 3:35 AM, DeadMG <span dir=3D"ltr"><<a href=3D"m=
ailto:wolfeinstein@gmail.com" target=3D"_blank">wolfeinstein@gmail.com</a>&=
gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">This proposal is just a bad idea. The only t=
hing wrong with our existing swap mechanisms are the difficulties of ADL, s=
uffered by *all* such functionality. Special-casing swap is not an enticing=
prospect.
<div class=3D"HOEnZb"><div class=3D"h5"><p></p>
-- <br>
=A0<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 <a href=3D"mailto:std-proposals%2Bunsubscribe@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>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den" target=3D"_blank">http://groups.google.com/a/isocpp=
..org/group/std-proposals/?hl=3Den</a>.<br>
=A0<br>
=A0<br>
</div></div></blockquote></div><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 />
--001a11c38e9a28919404dacde17d--
.
Author: DeadMG <wolfeinstein@gmail.com>
Date: Sat, 20 Apr 2013 10:33:28 -0700 (PDT)
Raw View
------=_Part_829_1932243.1366479208748
Content-Type: text/plain; charset=ISO-8859-1
The LWG states that:
swap keeps on throwing up interesting wrinkles, given its fundamental
> nature to library operations. This paper tries to take the idea of asking
> for an ADL 'swap' in the noexcept specification of a function, which is
> very hard to do with current language syntax.
> Consensus that this is a good problem to solve, but not yet sure that this
> paper is the right solution, with several other ideas mentioned, including
> separate papers by Jeffrey and Walter.
> We are sure to revisit this area again.
--
---
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_829_1932243.1366479208748
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
The LWG states that:<div><br></div><div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-colo=
r: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">swap k=
eeps on throwing up interesting wrinkles, given its fundamental nature to l=
ibrary operations. This paper tries to take the idea of asking for an ADL '=
swap' in the noexcept specification of a function, which is very hard to do=
with current language syntax.<br>Consensus that this is a good problem to =
solve, but not yet sure that this paper is the right solution, with several=
other ideas mentioned, including separate papers by Jeffrey and Walter.<br=
>We are sure to revisit this area again.</blockquote><p style=3D"color: rgb=
(37, 43, 55); font-family: arial, verdana, sans-serif; font-size: 14px; lin=
e-height: 19.109375px;"></p><p style=3D"color: rgb(37, 43, 55); font-family=
: arial, verdana, sans-serif; font-size: 14px; line-height: 19.109375px;"><=
/p></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_829_1932243.1366479208748--
.
Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@gmail.com>
Date: Sat, 20 Apr 2013 21:33:52 +0200
Raw View
2013/4/20 Andrew C. Morrow <andrew.c.morrow@gmail.com>:
>
> While we are talking about ADL and swap: was N3619, my proposal for
> std::is_swappable and std::is_nothrow_swappable, discussed at all at the
> Bristol meeting? I was unable to attend or to find an advocate for the
> paper. I understand that means that it was unlikely to be considered, but
> I'm still curious.
Sure. The paper was discussed and there was general interest in the
direction it goes. But there were also some oppositions against the
concrete way of the proposal to specify a trait that when used
intuitively, it gives the right answer for something that your
probably did not intend to ask for. E.g. asking for
std::is_swappable<int> cannot be true in any case, nor can ever the
motivating example
#include <swap_traits>
struct X {
X& operator=(X const&) = delete;
};
static_assert(!is_swappable<X>::value_type);
could work either even if there would not exist the problem with the
unconstrained swap template, simply because both tests are checking
whether *rvalues* of int or X can be swapped, which is not really a
typical case. I think the homogenous test of an lvalue-swap is much
more desirable as a fundamental trait. When the Swappable traits for
C++11 where specified, they where strongly influenced by the design of
the previous concepts
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3048.html
The textual requirement sets where intended to reflect the two concepts
auto concept HasSwap<typename T, typename U> {
void swap(T, U);
}
auto concept Swappable<typename T> : HasSwap<T&, T&> { }
My personal recommendation would be to provide
template<class T, class U>
struct is_swappable_with;
for the heterogeneous and "any value category" case and
template<class T>
struct is_swappable;
for the homogenous case lvalue case (plus the is_nothrow* variants).
If you are interested in following this path, let me please know of
this, because I'm also much interested in these traits and I'm
offering support to help with the wording if you want. . If you are
not, then let me please also know, since then I might consider to
suggest these traits by myself ;-). I suggest to wait a bit, because
during this meeting also a very interesting proposal of Jeffrey was
proposed that would allow that a call of std::swap always does "the
right thing" (That is: Respects ADL overloads and has the fall-back to
the generic versions). This probably makes the specification of these
traits much easier.
I should add that not everyone agrees on my position that
is_swappable_with is useful, but it is already part of the library
specification at several places and quite reasonable (again: My
opinion, not everyone's).
- Daniel
--
---
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.
.
Author: keithr@cplusplus.keithr.com
Date: Thu, 30 Jan 2014 10:55:08 -0800 (PST)
Raw View
------=_Part_141_5004006.1391108108352
Content-Type: text/plain; charset=UTF-8
If there's a way to resolve the parser ambiguities between "template_type<>
var" and "var <> var", I think <> is a better choice. It's *MUCH* easier to
type than either :=: or <=>. Try it for yourself: type "<>", ":=:", and
"<=>" a bunch of times, and it quickly becomes apparent that <> is
significantly easier. If the idea is that the swap operator will become
ubiquitous, at least in generic code, then I think we want something that's
quick to type.
Keith
On Friday, April 19, 2013 8:16:04 AM UTC-7, Chris Jefferson wrote:
>
> On 19/04/13 13:11, Michael Hsieh wrote:
> > I think "<>" is a much better choice even if what you say is true. But
> > we are not talk about other languages. If people so easy confused,
> > they'd better stay away from C++, because there are plenty of things
> > in C++ will confuse them. Every time I saw ":=" I just wonder how
> > could this be an assignment operator. And that's why I don't think
> > ":=:" is a swap operator.
>
> a<>b already means something in C++, it means "create a variable b, of
> type a (where a is a templated type where all parameters have a default
> value)."
>
> Chris
>
--
---
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/.
------=_Part_141_5004006.1391108108352
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">If there's a way to resolve the parser ambiguities between=
"template_type<> var" and "var <> var", I think <> is a =
better choice. It's *MUCH* easier to type than either :=3D: or <=3D>.=
Try it for yourself: type "<>", ":=3D:", and "<=3D>" a bunch o=
f times, and it quickly becomes apparent that <> is significantly eas=
ier. If the idea is that the swap operator will become ubiquitous, at least=
in generic code, then I think we want something that's quick to type.<br><=
br>Keith<br><br>On Friday, April 19, 2013 8:16:04 AM UTC-7, Chris Jefferson=
wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.=
8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On 19/04/13 13:11, Mich=
ael Hsieh wrote:
<br>> I think "<>" is a much better choice even if what you say is=
true. But=20
<br>> we are not talk about other languages. If people so easy confused,=
=20
<br>> they'd better stay away from C++, because there are plenty of thin=
gs=20
<br>> in C++ will confuse them. Every time I saw ":=3D" I just wonder ho=
w=20
<br>> could this be an assignment operator. And that's why I don't think=
=20
<br>> ":=3D:" is a swap operator.
<br>
<br>a<>b already means something in C++, it means "create a variable =
b, of=20
<br>type a (where a is a templated type where all parameters have a default=
=20
<br>value)."
<br>
<br>Chris
<br></blockquote></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/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_141_5004006.1391108108352--
.
Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Thu, 30 Jan 2014 14:45:50 -0500
Raw View
On 2014-01-30 13:55, keithr@cplusplus.keithr.com wrote:
> If there's a way to resolve the parser ambiguities between "template_type<>
> var" and "var <> var", I think <> is a better choice. It's *MUCH* easier to
> type than either :=: or <=>. Try it for yourself: type "<>", ":=:", and
> "<=>" a bunch of times, and it quickly becomes apparent that <> is
> significantly easier. If the idea is that the swap operator will become
> ubiquitous, at least in generic code, then I think we want something that's
> quick to type.
What about '><'? That's probably less likely to be ambiguous. (Maybe
even entirely unambiguous, as I'm not sure there is any situation in
which '<' can currently legally follow '>'?)
--
Matthew
--
---
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/.
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Thu, 30 Jan 2014 21:54:34 +0200
Raw View
On 30 January 2014 21:45, Matthew Woehlke
<mw_triad@users.sourceforge.net> wrote:
> On 2014-01-30 13:55, keithr@cplusplus.keithr.com wrote:
>>
>> If there's a way to resolve the parser ambiguities between
>> "template_type<>
>> var" and "var <> var", I think <> is a better choice. It's *MUCH* easier
>> to
>> type than either :=: or <=>. Try it for yourself: type "<>", ":=:", and
>> "<=>" a bunch of times, and it quickly becomes apparent that <> is
>> significantly easier. If the idea is that the swap operator will become
>> ubiquitous, at least in generic code, then I think we want something
>> that's
>> quick to type.
>
>
> What about '><'? That's probably less likely to be ambiguous. (Maybe even
> entirely unambiguous, as I'm not sure there is any situation in which '<'
> can currently legally follow '>'?)
Do a less-than comparison of a variable template instance and something
else, as in
if (pi<T><4)
--
---
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/.
.
Author: "Billy O'Neal" <billy.oneal@gmail.com>
Date: Thu, 30 Jan 2014 11:58:18 -0800
Raw View
--047d7b47281602683d04f1357d0d
Content-Type: text/plain; charset=UTF-8
The other problem with <> is that people will expect it to mean not equal.
Billy O'Neal
https://github.com/BillyONeal/ <https://bitbucket.org/BillyONeal/>
http://stackoverflow.com/users/82320/billy-oneal
On Thu, Jan 30, 2014 at 11:54 AM, Ville Voutilainen <
ville.voutilainen@gmail.com> wrote:
> On 30 January 2014 21:45, Matthew Woehlke
> <mw_triad@users.sourceforge.net> wrote:
> > On 2014-01-30 13:55, keithr@cplusplus.keithr.com wrote:
> >>
> >> If there's a way to resolve the parser ambiguities between
> >> "template_type<>
> >> var" and "var <> var", I think <> is a better choice. It's *MUCH* easier
> >> to
> >> type than either :=: or <=>. Try it for yourself: type "<>", ":=:", and
> >> "<=>" a bunch of times, and it quickly becomes apparent that <> is
> >> significantly easier. If the idea is that the swap operator will become
> >> ubiquitous, at least in generic code, then I think we want something
> >> that's
> >> quick to type.
> >
> >
> > What about '><'? That's probably less likely to be ambiguous. (Maybe even
> > entirely unambiguous, as I'm not sure there is any situation in which '<'
> > can currently legally follow '>'?)
>
> Do a less-than comparison of a variable template instance and something
> else, as in
>
> if (pi<T><4)
>
> --
>
> ---
> 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/.
>
--
---
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/.
--047d7b47281602683d04f1357d0d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">The other problem with <> is that people will expect=
it to mean not equal.</div><div class=3D"gmail_extra"><br clear=3D"all"><d=
iv><div dir=3D"ltr"><div>Billy O'Neal</div><div><a href=3D"https://bitb=
ucket.org/BillyONeal/" target=3D"_blank">https://github.com/BillyONeal/</a>=
</div>
<div><a href=3D"http://stackoverflow.com/users/82320/billy-oneal" target=3D=
"_blank">http://stackoverflow.com/users/82320/billy-oneal</a></div></div></=
div>
<br><br><div class=3D"gmail_quote">On Thu, Jan 30, 2014 at 11:54 AM, Ville =
Voutilainen <span dir=3D"ltr"><<a href=3D"mailto:ville.voutilainen@gmail=
..com" target=3D"_blank">ville.voutilainen@gmail.com</a>></span> wrote:<b=
r><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:=
1px #ccc solid;padding-left:1ex">
On 30 January 2014 21:45, Matthew Woehlke<br>
<div class=3D"im"><<a href=3D"mailto:mw_triad@users.sourceforge.net">mw_=
triad@users.sourceforge.net</a>> wrote:<br>
> On 2014-01-30 13:55, <a href=3D"mailto:keithr@cplusplus.keithr.com">ke=
ithr@cplusplus.keithr.com</a> wrote:<br>
>><br>
>> If there's a way to resolve the parser ambiguities between<br>
>> "template_type<><br>
>> var" and "var <> var", I think <> is a =
better choice. It's *MUCH* easier<br>
>> to<br>
>> type than either :=3D: or <=3D>. Try it for yourself: type &=
quot;<>", ":=3D:", and<br>
>> "<=3D>" a bunch of times, and it quickly becomes a=
pparent that <> is<br>
>> significantly easier. If the idea is that the swap operator will b=
ecome<br>
>> ubiquitous, at least in generic code, then I think we want somethi=
ng<br>
>> that's<br>
>> quick to type.<br>
><br>
><br>
> What about '><'? That's probably less likely to be a=
mbiguous. (Maybe even<br>
> entirely unambiguous, as I'm not sure there is any situation in wh=
ich '<'<br>
> can currently legally follow '>'?)<br>
<br>
</div>Do a less-than comparison of a variable template instance and somethi=
ng<br>
else, as in<br>
<br>
if (pi<T><4)<br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
--<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 <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-propo=
sals+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>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><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/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--047d7b47281602683d04f1357d0d--
.
Author: Thiago Macieira <thiago@macieira.info>
Date: Thu, 30 Jan 2014 16:40:53 -0800
Raw View
Em qui 30 jan 2014, =E0s 21:54:34, Ville Voutilainen escreveu:
> if (pi<T><4)
Brings back memories of >>. We no longer parse it as a single token.
So why should the above be parsed as the operator ><? If it closes a templa=
te,=20
it is a template, not operator>> or operator><.
If the above were a problem, it would be too for:
if (pi<T>>4)
wouldn't it?
--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
.
Author: Richard Smith <richard@metafoo.co.uk>
Date: Thu, 30 Jan 2014 16:54:30 -0800
Raw View
--089e0158a82ad3664404f1399da9
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Thu, Jan 30, 2014 at 4:40 PM, Thiago Macieira <thiago@macieira.info>wrot=
e:
> Em qui 30 jan 2014, =E0s 21:54:34, Ville Voutilainen escreveu:
> > if (pi<T><4)
>
> Brings back memories of >>. We no longer parse it as a single token.
>
> So why should the above be parsed as the operator ><? If it closes a
> template,
> it is a template, not operator>> or operator><.
>
> If the above were a problem, it would be too for:
> if (pi<T>>4)
> wouldn't it?
>
Without expressing a preference on the >< syntax, I'd like to note that
variable templates made another syntactic wart bigger:
pi<double>=3D2.0*acos(0.0); // error!
if (pi<int>>=3D4) throw BadPi(); // error!
Perhaps the time has come to give >=3D and >>=3D the same treatment as >>.
--=20
---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
--089e0158a82ad3664404f1399da9
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On T=
hu, Jan 30, 2014 at 4:40 PM, Thiago Macieira <span dir=3D"ltr"><<a href=
=3D"mailto:thiago@macieira.info" target=3D"_blank">thiago@macieira.info</a>=
></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Em qui 30 jan 2014, =E0s 21:54:34, Ville Vou=
tilainen escreveu:<br>
> if (pi<T><4)<br>
<br>
Brings back memories of >>. We no longer parse it as a single token.<=
br>
<br>
So why should the above be parsed as the operator ><? If it closes a =
template,<br>
it is a template, not operator>> or operator><.<br>
<br>
If the above were a problem, it would be too for:<br>
=A0 =A0 =A0 =A0 if (pi<T>>4)<br>
wouldn't it?<br></blockquote><div><br></div><div>Without expressing a p=
reference on the >< syntax, I'd like to note that variable templa=
tes made another syntactic wart bigger:</div><div><br></div><div>=A0 pi<=
double>=3D2.0*acos(0.0); // error!</div>
<div>=A0 if (pi<int>>=3D4) throw BadPi(); // error!</div><div><br>=
</div><div>Perhaps the time has come to give >=3D and >>=3D the sa=
me treatment as >>.</div></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/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--089e0158a82ad3664404f1399da9--
.
Author: Miro Knejp <miro@knejp.de>
Date: Fri, 31 Jan 2014 02:42:35 +0100
Raw View
Am 30.01.2014 19:55, schrieb keithr@cplusplus.keithr.com:
> If there's a way to resolve the parser ambiguities between
> "template_type<> var" and "var <> var", I think <> is a better choice.
> It's *MUCH* easier to type than either :=: or <=>. Try it for
> yourself: type "<>", ":=:", and "<=>" a bunch of times, and it quickly
> becomes apparent that <> is significantly easier. If the idea is that
> the swap operator will become ubiquitous, at least in generic code,
> then I think we want something that's quick to type.
Great argument. That is, assuming every programmer in the entire world
uses the English keyboard layout of course...
--
---
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/.
.
Author: "Billy O'Neal" <billy.oneal@gmail.com>
Date: Thu, 30 Jan 2014 18:07:22 -0800
Raw View
--001a11c2d3b6cd760504f13aa426
Content-Type: text/plain; charset=UTF-8
Is there any reason we really need to make the operator be composed of
symbols?
What about __swap(a, b) ?
Billy O'Neal
https://github.com/BillyONeal/ <https://bitbucket.org/BillyONeal/>
http://stackoverflow.com/users/82320/billy-oneal
On Thu, Jan 30, 2014 at 5:42 PM, Miro Knejp <miro@knejp.de> wrote:
>
> Am 30.01.2014 19:55, schrieb keithr@cplusplus.keithr.com:
>
>> If there's a way to resolve the parser ambiguities between
>> "template_type<> var" and "var <> var", I think <> is a better choice. It's
>> *MUCH* easier to type than either :=: or <=>. Try it for yourself: type
>> "<>", ":=:", and "<=>" a bunch of times, and it quickly becomes apparent
>> that <> is significantly easier. If the idea is that the swap operator will
>> become ubiquitous, at least in generic code, then I think we want something
>> that's quick to type.
>>
> Great argument. That is, assuming every programmer in the entire world
> uses the English keyboard layout of course...
>
>
> --
>
> --- 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/.
>
--
---
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/.
--001a11c2d3b6cd760504f13aa426
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Is there any reason we really need to make the operat=
or be composed of symbols?</div><div><br></div><div>What about __swap(a, b)=
?</div></div><div class=3D"gmail_extra"><br clear=3D"all"><div><div dir=3D=
"ltr">
<div>Billy O'Neal</div><div><a href=3D"https://bitbucket.org/BillyONeal=
/" target=3D"_blank">https://github.com/BillyONeal/</a></div><div><a href=
=3D"http://stackoverflow.com/users/82320/billy-oneal" target=3D"_blank">htt=
p://stackoverflow.com/users/82320/billy-oneal</a></div>
</div></div>
<br><br><div class=3D"gmail_quote">On Thu, Jan 30, 2014 at 5:42 PM, Miro Kn=
ejp <span dir=3D"ltr"><<a href=3D"mailto:miro@knejp.de" target=3D"_blank=
">miro@knejp.de</a>></span> wrote:<br><blockquote class=3D"gmail_quote" =
style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Am 30.01.2014 19:55, schrieb <a href=3D"mailto:keithr@cplusplus.keithr.com"=
target=3D"_blank">keithr@cplusplus.keithr.com</a>:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;padding=
-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-l=
eft-style:solid">
If there's a way to resolve the parser ambiguities between "templa=
te_type<> var" and "var <> var", I think <>=
; is a better choice. It's *MUCH* easier to type than either :=3D: or &=
lt;=3D>. Try it for yourself: type "<>", ":=3D:&quo=
t;, and "<=3D>" a bunch of times, and it quickly becomes ap=
parent that <> is significantly easier. If the idea is that the swap =
operator will become ubiquitous, at least in generic code, then I think we =
want something that's quick to type.<br>
</blockquote>
Great argument. That is, assuming every programmer in the entire world uses=
the English keyboard layout of course...<span class=3D"HOEnZb"><font color=
=3D"#888888"><br>
<br>
<br>
-- <br>
<br>
--- You received this message because you are subscribed to the Google Grou=
ps "ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org" target=3D=
"_blank">std-proposals+unsubscribe@<u></u>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>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/<u></u>isocpp.=
org/group/std-<u></u>proposals/</a>.<br>
</font></span></blockquote></div><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/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--001a11c2d3b6cd760504f13aa426--
.
Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@gmail.com>
Date: Fri, 31 Jan 2014 13:22:59 +0100
Raw View
2014/1/31 Billy O'Neal <billy.oneal@gmail.com>:
> Is there any reason we really need to make the operator be composed of
> symbols?
>
> What about __swap(a, b) ?
The Standard C++ Library has the tradition to stay away from
introducing public API based on names that are reserved to
implementors. This would make a very unfortunate (albeit technical
possible) exception of this rule.
- Daniel
> Billy O'Neal
> https://github.com/BillyONeal/
> http://stackoverflow.com/users/82320/billy-oneal
>
>
> On Thu, Jan 30, 2014 at 5:42 PM, Miro Knejp <miro@knejp.de> wrote:
>>
>>
>> Am 30.01.2014 19:55, schrieb keithr@cplusplus.keithr.com:
>>>
>>> If there's a way to resolve the parser ambiguities between
>>> "template_type<> var" and "var <> var", I think <> is a better choice. It's
>>> *MUCH* easier to type than either :=: or <=>. Try it for yourself: type
>>> "<>", ":=:", and "<=>" a bunch of times, and it quickly becomes apparent
>>> that <> is significantly easier. If the idea is that the swap operator will
>>> become ubiquitous, at least in generic code, then I think we want something
>>> that's quick to type.
>>
>> Great argument. That is, assuming every programmer in the entire world
>> uses the English keyboard layout of course...
>>
>>
>> --
>>
>> --- 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/.
>
>
> --
>
> ---
> 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/.
--
---
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/.
.
Author: Ross Smith <rosss@pharos.co.nz>
Date: Mon, 03 Feb 2014 09:23:08 +1300
Raw View
On 2014-01-31 14:42, Miro Knejp wrote:
>
> Am 30.01.2014 19:55, schrieb keithr@cplusplus.keithr.com:
>> If there's a way to resolve the parser ambiguities between
>> "template_type<> var" and "var <> var", I think <> is a better choice.
>> It's *MUCH* easier to type than either :=: or <=>. Try it for
>> yourself: type "<>", ":=:", and "<=>" a bunch of times, and it quickly
>> becomes apparent that <> is significantly easier. If the idea is that
>> the swap operator will become ubiquitous, at least in generic code,
>> then I think we want something that's quick to type.
> Great argument. That is, assuming every programmer in the entire world
> uses the English keyboard layout of course...
How about "<:>"? It's easy to type (the keys are close together on most
keyboards, and all shifted), and in no danger of being confused with
anything else.
Ross Smith
--
---
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/.
.
Author: Miro Knejp <miro@knejp.de>
Date: Sun, 02 Feb 2014 22:05:47 +0100
Raw View
Am 02.02.2014 21:23, schrieb Ross Smith:
> On 2014-01-31 14:42, Miro Knejp wrote:
>>
>> Am 30.01.2014 19:55, schrieb keithr@cplusplus.keithr.com:
>>> If there's a way to resolve the parser ambiguities between
>>> "template_type<> var" and "var <> var", I think <> is a better choice.
>>> It's *MUCH* easier to type than either :=: or <=>. Try it for
>>> yourself: type "<>", ":=:", and "<=>" a bunch of times, and it quickly
>>> becomes apparent that <> is significantly easier. If the idea is that
>>> the swap operator will become ubiquitous, at least in generic code,
>>> then I think we want something that's quick to type.
>> Great argument. That is, assuming every programmer in the entire world
>> uses the English keyboard layout of course...
>
> How about "<:>"? It's easy to type (the keys are close together on
> most keyboards, and all shifted), and in no danger of being confused
> with anything else.
>
> Ross Smith
"easy to type" is not really an argument. Define "most keyboards". I
know layouts where some of those keys are not shifted and not close
together, so there you go. Are we going to judge if they are uncommon
enough to not be important? After all, this is a forum of the
*International* SO. Keyboard layout preferences should not be of concern.
"easy to read and understand" is far more important. Code is written
once and read many times.
--
---
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/.
.
Author: =?ISO-8859-1?Q?David_Rodr=EDguez_Ibeas?= <dibeas@ieee.org>
Date: Tue, 4 Feb 2014 10:47:51 -0500
Raw View
--089e013cba96119c0304f1969093
Content-Type: text/plain; charset=ISO-8859-1
On Sun, Feb 2, 2014 at 4:05 PM, Miro Knejp <miro@knejp.de> wrote:
> [...] I know layouts where some of those keys are not shifted and not
> close together, so there you go.
For starters most Spanish keyboards, with Spanish being one of the most
common languages in the world I imagine there is a large enough group of
C++ programmers using these layouts.
--
---
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/.
--089e013cba96119c0304f1969093
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On S=
un, Feb 2, 2014 at 4:05 PM, Miro Knejp <span dir=3D"ltr"><<a href=3D"mai=
lto:miro@knejp.de" target=3D"_blank">miro@knejp.de</a>></span> wrote:<br=
><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=
px #ccc solid;padding-left:1ex">
[...] I know layouts where some of those keys are not shifted and not close=
together, so there you go.=A0</blockquote><div><br>For starters most Spani=
sh keyboards, with Spanish being one of the most common languages in the wo=
rld I imagine there is a large enough group of C++ programmers using these =
layouts.=A0</div>
</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/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--089e013cba96119c0304f1969093--
.
Author: morwenn29@gmail.com
Date: Tue, 4 Feb 2014 12:58:08 -0800 (PST)
Raw View
------=_Part_5838_21728254.1391547488472
Content-Type: text/plain; charset=UTF-8
>
> How about "<:>"? It's easy to type (the keys are close together on most
> keyboards, and all shifted), and in no danger of being confused with
> anything else.
>
> Ross Smith
>
I bet it would conflict with digraphs.
--
---
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/.
------=_Part_5838_21728254.1391547488472
Content-Type: text/html; charset=UTF-8
<div dir="ltr"><blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">How about "<:>"? It's easy to type (the keys are close together on most
<br>keyboards, and all shifted), and in no danger of being confused with
<br>anything else.
<br>
<br>Ross Smith
<br></blockquote><div><br>I bet it would conflict with digraphs. <br></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email 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="http://groups.google.com/a/isocpp.org/group/std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/</a>.<br />
------=_Part_5838_21728254.1391547488472--
.