Topic: Containers of references?


Author: NDos Dannyu <ndospark320@naver.com>
Date: Tue, 3 Jan 2017 16:57:53 -0800 (PST)
Raw View
------=_Part_3686_1229345435.1483491473786
Content-Type: multipart/alternative;
 boundary="----=_Part_3687_1651394577.1483491473786"

------=_Part_3687_1651394577.1483491473786
Content-Type: text/plain; charset=UTF-8

 I tried to make multiplex of std::set, named NDos::set_multiplex, which
can view the elements in perspective of various comparison objects. For
example, a set of playing cards could be sorted with rank first and suit
second, or suit first and rank second; NDos::set_multiplexenables to do
this conveniently. NDos::set_multiplex does this by inheriting a std::set storing
the elements, and multiple std::multisets storing the iterator to the
elements.
 But I got a problem: I couldn't implement erasure method properly. It
should be able to erase an element in perspective of any comparison object,
but it can't. The ones storing the iterator to the elements expects the
iterator to an element to be erased, and it is impossible to acquire such
an iterator.
 So I specialized my own implementation of std::multiset to be able to
store references, and I replaced the std::multisets by them.
 And I request this feature to be added in the standard. It also could be
done for std::list, std::map,  std::unordered_set, etc.

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

------=_Part_3687_1651394577.1483491473786
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><span style=3D"color: rgb(36, 39, 41); font-family: A=
rial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px;">=
=C2=A0I tried to make multiplex of=C2=A0</span><code style=3D"padding: 1px =
5px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quo=
t;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera=
 Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; backgroun=
d-color: rgb(239, 240, 241); white-space: pre-wrap; color: rgb(36, 39, 41);=
">std::set</code><span style=3D"color: rgb(36, 39, 41); font-family: Arial,=
 &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px;">, nam=
ed=C2=A0</span><code style=3D"padding: 1px 5px; font-family: Consolas, Menl=
o, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;D=
ejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier =
New&quot;, monospace, sans-serif; background-color: rgb(239, 240, 241); whi=
te-space: pre-wrap; color: rgb(36, 39, 41);">NDos::set_multiplex</code><spa=
n style=3D"color: rgb(36, 39, 41); font-family: Arial, &quot;Helvetica Neue=
&quot;, Helvetica, sans-serif; font-size: 15px;">, which can view the eleme=
nts in perspective of various comparison objects. For example, a set of pla=
ying cards could be sorted with rank first and suit second, or suit first a=
nd rank second;=C2=A0</span><code style=3D"padding: 1px 5px; font-family: C=
onsolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&q=
uot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &=
quot;Courier New&quot;, monospace, sans-serif; background-color: rgb(239, 2=
40, 241); white-space: pre-wrap; color: rgb(36, 39, 41);">NDos::set_multipl=
ex</code><span style=3D"color: rgb(36, 39, 41); font-family: Arial, &quot;H=
elvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px;">enables to do=
 this conveniently.=C2=A0</span><code style=3D"padding: 1px 5px; font-famil=
y: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mo=
no&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot=
;, &quot;Courier New&quot;, monospace, sans-serif; background-color: rgb(23=
9, 240, 241); white-space: pre-wrap; color: rgb(36, 39, 41);">NDos::set_mul=
tiplex</code><span style=3D"color: rgb(36, 39, 41); font-family: Arial, &qu=
ot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px;">=C2=A0doe=
s this by inheriting a</span><span style=3D"color: rgb(36, 39, 41); font-fa=
mily: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: =
15px;">=C2=A0</span><code style=3D"padding: 1px 5px; font-family: Consolas,=
 Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &q=
uot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Cou=
rier New&quot;, monospace, sans-serif; background-color: rgb(239, 240, 241)=
; white-space: pre-wrap; color: rgb(36, 39, 41);">std::set</code><span styl=
e=3D"color: rgb(36, 39, 41); font-family: Arial, &quot;Helvetica Neue&quot;=
, Helvetica, sans-serif; font-size: 15px;">=C2=A0storing the elements, and =
multiple=C2=A0</span><code style=3D"padding: 1px 5px; font-family: Consolas=
, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &=
quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Co=
urier New&quot;, monospace, sans-serif; background-color: rgb(239, 240, 241=
); white-space: pre-wrap; color: rgb(36, 39, 41);">std::multiset</code><spa=
n style=3D"color: rgb(36, 39, 41); font-family: Arial, &quot;Helvetica Neue=
&quot;, Helvetica, sans-serif; font-size: 15px;">s storing the iterator to =
the elements.</span></div><div><span style=3D"color: rgb(36, 39, 41); font-=
family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size=
: 15px;">=C2=A0But I got a problem: I couldn&#39;t implement erasure method=
 properly. It should be able to erase an element in perspective of any comp=
arison object, but it can&#39;t. The ones storing the iterator to the eleme=
nts expects the iterator to an element to be erased, and it is impossible t=
o acquire such an iterator.</span></div><div><span style=3D"color: rgb(36, =
39, 41); font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-se=
rif; font-size: 15px;">=C2=A0So I specialized my own implementation of</spa=
n><span style=3D"color: rgb(36, 39, 41); font-family: Arial, &quot;Helvetic=
a Neue&quot;, Helvetica, sans-serif; font-size: 15px;">=C2=A0</span><code s=
tyle=3D"padding: 1px 5px; font-family: Consolas, Menlo, Monaco, &quot;Lucid=
a Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;,=
 &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, =
sans-serif; background-color: rgb(239, 240, 241); white-space: pre-wrap; co=
lor: rgb(36, 39, 41);">std::multiset</code><span style=3D"color: rgb(36, 39=
, 41); font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-seri=
f; font-size: 15px;">=C2=A0to be able to store references, and I replaced t=
he</span><span style=3D"color: rgb(36, 39, 41); font-family: Arial, &quot;H=
elvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px;">=C2=A0</span>=
<code style=3D"padding: 1px 5px; font-family: Consolas, Menlo, Monaco, &quo=
t;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono=
&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, mono=
space, sans-serif; background-color: rgb(239, 240, 241); white-space: pre-w=
rap; color: rgb(36, 39, 41);">std::multiset</code><span style=3D"color: rgb=
(36, 39, 41); font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sa=
ns-serif; font-size: 15px;">s by them.</span></div><div><span style=3D"colo=
r: rgb(36, 39, 41); font-family: Arial, &quot;Helvetica Neue&quot;, Helveti=
ca, sans-serif; font-size: 15px;">=C2=A0And I request this feature to be ad=
ded in the standard. It also could be done for</span><span style=3D"color: =
rgb(36, 39, 41); font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica,=
 sans-serif; font-size: 15px;">=C2=A0</span><code style=3D"padding: 1px 5px=
; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;L=
iberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sa=
ns Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; background-c=
olor: rgb(239, 240, 241); white-space: pre-wrap; color: rgb(36, 39, 41);">s=
td::list</code><span style=3D"color: rgb(36, 39, 41); font-family: Arial, &=
quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px;">,=C2=A0=
</span><code style=3D"padding: 1px 5px; font-family: Consolas, Menlo, Monac=
o, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sa=
ns Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot=
;, monospace, sans-serif; background-color: rgb(239, 240, 241); white-space=
: pre-wrap; color: rgb(36, 39, 41);">std::map</code><span style=3D"color: r=
gb(36, 39, 41); font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, =
sans-serif; font-size: 15px;">,=C2=A0</span><span style=3D"color: rgb(36, 3=
9, 41); font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-ser=
if; font-size: 15px;">=C2=A0</span><code style=3D"padding: 1px 5px; font-fa=
mily: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation=
 Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&q=
uot;, &quot;Courier New&quot;, monospace, sans-serif; background-color: rgb=
(239, 240, 241); white-space: pre-wrap; color: rgb(36, 39, 41);">std::unord=
ered_set</code><span style=3D"color: rgb(36, 39, 41); font-family: Arial, &=
quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px;">, etc.<=
/span></div></div>

<p></p>

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

------=_Part_3687_1651394577.1483491473786--

------=_Part_3686_1229345435.1483491473786--

.


Author: Thiago Macieira <thiago@macieira.org>
Date: Tue, 03 Jan 2017 23:40:29 -0200
Raw View
On ter=C3=A7a-feira, 3 de janeiro de 2017 16:57:53 BRST NDos Dannyu wrote:
>  So I specialized my own implementation of std::multiset to be able to
> store references, and I replaced the std::multisets by them.
>  And I request this feature to be added in the standard. It also could be
> done for std::list, std::map,  std::unordered_set, etc.

You can do that with a container of pointers, only that you have to=20
dereference the pointer before accessing the data. I think this conveys mor=
e=20
information, including the fact that the ownership of the data is unclear a=
nd=20
that the container doesn't own anything at all.

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

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

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Tue, 03 Jan 2017 21:05:26 -0500
Raw View
<html><head></head><body lang=3D"en-US" style=3D"background-color: rgb(255,=
 255, 255); line-height: initial;">                                        =
                                              <div style=3D"width: 100%; fo=
nt-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif=
; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, =
255, 255);">Have you looked at boost::multi_index?</div>                   =
                                                                           =
                                       <div style=3D"width: 100%; font-size=
: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color=
: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 25=
5);"><br style=3D"display:initial"></div>                                  =
                                                                           =
                                                                           =
           <div style=3D"font-size: initial; font-family: Calibri, 'Slate P=
ro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; =
background-color: rgb(255, 255, 255);">Sent&nbsp;from&nbsp;my&nbsp;BlackBer=
ry&nbsp;portable&nbsp;Babbage&nbsp;Device</div>                            =
                                                                           =
                                                                           =
<table width=3D"100%" style=3D"background-color:white;border-spacing:0px;">=
 <tbody><tr><td colspan=3D"2" style=3D"font-size: initial; text-align: init=
ial; background-color: rgb(255, 255, 255);">                           <div=
 style=3D"border-style: solid none none; border-top-color: rgb(181, 196, 22=
3); border-top-width: 1pt; padding: 3pt 0in 0in; font-family: Tahoma, 'BB A=
lpha Sans', 'Slate Pro'; font-size: 10pt;">  <div><b>From: </b>NDos Dannyu<=
/div><div><b>Sent: </b>Tuesday, January 3, 2017 7:57 PM</div><div><b>To: </=
b>ISO C++ Standard - Future Proposals</div><div><b>Reply To: </b>std-propos=
als@isocpp.org</div><div><b>Subject: </b>[std-proposals] Containers of refe=
rences?</div></div></td></tr></tbody></table><div style=3D"border-style: so=
lid none none; border-top-color: rgb(186, 188, 209); border-top-width: 1pt;=
 font-size: initial; text-align: initial; background-color: rgb(255, 255, 2=
55);"></div><br><div id=3D"_originalContent" style=3D""><div dir=3D"ltr"><d=
iv><span style=3D"color: rgb(36, 39, 41); font-family: Arial, &quot;Helveti=
ca Neue&quot;, Helvetica, sans-serif; font-size: 15px;">&nbsp;I tried to ma=
ke multiplex of&nbsp;</span><code style=3D"padding: 1px 5px; font-family: C=
onsolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&q=
uot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &=
quot;Courier New&quot;, monospace, sans-serif; background-color: rgb(239, 2=
40, 241); white-space: pre-wrap; color: rgb(36, 39, 41);">std::set</code><s=
pan style=3D"color: rgb(36, 39, 41); font-family: Arial, &quot;Helvetica Ne=
ue&quot;, Helvetica, sans-serif; font-size: 15px;">, named&nbsp;</span><cod=
e style=3D"padding: 1px 5px; font-family: Consolas, Menlo, Monaco, &quot;Lu=
cida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quo=
t;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospac=
e, sans-serif; background-color: rgb(239, 240, 241); white-space: pre-wrap;=
 color: rgb(36, 39, 41);">NDos::set_multiplex</code><span style=3D"color: r=
gb(36, 39, 41); font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, =
sans-serif; font-size: 15px;">, which can view the elements in perspective =
of various comparison objects. For example, a set of playing cards could be=
 sorted with rank first and suit second, or suit first and rank second;&nbs=
p;</span><code style=3D"padding: 1px 5px; font-family: Consolas, Menlo, Mon=
aco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu =
Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&qu=
ot;, monospace, sans-serif; background-color: rgb(239, 240, 241); white-spa=
ce: pre-wrap; color: rgb(36, 39, 41);">NDos::set_multiplex</code><span styl=
e=3D"color: rgb(36, 39, 41); font-family: Arial, &quot;Helvetica Neue&quot;=
, Helvetica, sans-serif; font-size: 15px;">enables to do this conveniently.=
&nbsp;</span><code style=3D"padding: 1px 5px; font-family: Consolas, Menlo,=
 Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;Dej=
aVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier Ne=
w&quot;, monospace, sans-serif; background-color: rgb(239, 240, 241); white=
-space: pre-wrap; color: rgb(36, 39, 41);">NDos::set_multiplex</code><span =
style=3D"color: rgb(36, 39, 41); font-family: Arial, &quot;Helvetica Neue&q=
uot;, Helvetica, sans-serif; font-size: 15px;">&nbsp;does this by inheritin=
g a</span><span style=3D"color: rgb(36, 39, 41); font-family: Arial, &quot;=
Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px;">&nbsp;</span=
><code style=3D"padding: 1px 5px; font-family: Consolas, Menlo, Monaco, &qu=
ot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mon=
o&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, mon=
ospace, sans-serif; background-color: rgb(239, 240, 241); white-space: pre-=
wrap; color: rgb(36, 39, 41);">std::set</code><span style=3D"color: rgb(36,=
 39, 41); font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-s=
erif; font-size: 15px;">&nbsp;storing the elements, and multiple&nbsp;</spa=
n><code style=3D"padding: 1px 5px; font-family: Consolas, Menlo, Monaco, &q=
uot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mo=
no&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, mo=
nospace, sans-serif; background-color: rgb(239, 240, 241); white-space: pre=
-wrap; color: rgb(36, 39, 41);">std::multiset</code><span style=3D"color: r=
gb(36, 39, 41); font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, =
sans-serif; font-size: 15px;">s storing the iterator to the elements.</span=
></div><div><span style=3D"color: rgb(36, 39, 41); font-family: Arial, &quo=
t;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px;">&nbsp;But =
I got a problem: I couldn't implement erasure method properly. It should be=
 able to erase an element in perspective of any comparison object, but it c=
an't. The ones storing the iterator to the elements expects the iterator to=
 an element to be erased, and it is impossible to acquire such an iterator.=
</span></div><div><span style=3D"color: rgb(36, 39, 41); font-family: Arial=
, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px;">&nbs=
p;So I specialized my own implementation of</span><span style=3D"color: rgb=
(36, 39, 41); font-family: Arial, &quot;Helvetica Neue&quot;, Helvetica, sa=
ns-serif; font-size: 15px;">&nbsp;</span><code style=3D"padding: 1px 5px; f=
ont-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Libe=
ration Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans =
Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; background-colo=
r: rgb(239, 240, 241); white-space: pre-wrap; color: rgb(36, 39, 41);">std:=
:multiset</code><span style=3D"color: rgb(36, 39, 41); font-family: Arial, =
&quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px;">&nbsp;=
to be able to store references, and I replaced the</span><span style=3D"col=
or: rgb(36, 39, 41); font-family: Arial, &quot;Helvetica Neue&quot;, Helvet=
ica, sans-serif; font-size: 15px;">&nbsp;</span><code style=3D"padding: 1px=
 5px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &qu=
ot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Ver=
a Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; backgrou=
nd-color: rgb(239, 240, 241); white-space: pre-wrap; color: rgb(36, 39, 41)=
;">std::multiset</code><span style=3D"color: rgb(36, 39, 41); font-family: =
Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px;"=
>s by them.</span></div><div><span style=3D"color: rgb(36, 39, 41); font-fa=
mily: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: =
15px;">&nbsp;And I request this feature to be added in the standard. It als=
o could be done for</span><span style=3D"color: rgb(36, 39, 41); font-famil=
y: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15p=
x;">&nbsp;</span><code style=3D"padding: 1px 5px; font-family: Consolas, Me=
nlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot=
;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courie=
r New&quot;, monospace, sans-serif; background-color: rgb(239, 240, 241); w=
hite-space: pre-wrap; color: rgb(36, 39, 41);">std::list</code><span style=
=3D"color: rgb(36, 39, 41); font-family: Arial, &quot;Helvetica Neue&quot;,=
 Helvetica, sans-serif; font-size: 15px;">,&nbsp;</span><code style=3D"padd=
ing: 1px 5px; font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&qu=
ot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitst=
ream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace, sans-serif; =
background-color: rgb(239, 240, 241); white-space: pre-wrap; color: rgb(36,=
 39, 41);">std::map</code><span style=3D"color: rgb(36, 39, 41); font-famil=
y: Arial, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15p=
x;">,&nbsp;</span><span style=3D"color: rgb(36, 39, 41); font-family: Arial=
, &quot;Helvetica Neue&quot;, Helvetica, sans-serif; font-size: 15px;">&nbs=
p;</span><code style=3D"padding: 1px 5px; font-family: Consolas, Menlo, Mon=
aco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu =
Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&qu=
ot;, monospace, sans-serif; background-color: rgb(239, 240, 241); white-spa=
ce: pre-wrap; color: rgb(36, 39, 41);">std::unordered_set</code><span style=
=3D"color: rgb(36, 39, 41); font-family: Arial, &quot;Helvetica Neue&quot;,=
 Helvetica, sans-serif; font-size: 15px;">, etc.</span></div></div>

<p></p>

-- <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 e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/b20edd34-15bb-453c-be8d-c21a83a90fdf%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter">https://groups.goo=
gle.com/a/isocpp.org/d/msgid/std-proposals/b20edd34-15bb-453c-be8d-c21a83a9=
0fdf%40isocpp.org</a>.<br>
<br><!--end of _originalContent --></div></body></html>

<p></p>

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

.


Author: arthur.odwyer@mixpanel.com
Date: Wed, 4 Jan 2017 15:49:47 -0800 (PST)
Raw View
------=_Part_3399_464524956.1483573787616
Content-Type: multipart/alternative;
 boundary="----=_Part_3400_595855517.1483573787616"

------=_Part_3400_595855517.1483573787616
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Tuesday, January 3, 2017 at 4:57:54 PM UTC-8, NDos Dannyu wrote:
>
>  I tried to make multiplex of std::set, named NDos::set_multiplex, which=
=20
> can view the elements in perspective of various comparison objects. For=
=20
> example, a set of playing cards could be sorted with rank first and suit=
=20
> second, or suit first and rank second; NDos::set_multiplexenables to do=
=20
> this conveniently. NDos::set_multiplex does this by inheriting a std::set=
 storing=20
> the elements, and multiple std::multisets storing the iterator to the=20
> elements.
>  But I got a problem: I couldn't implement erasure method properly. It=20
> should be able to erase an element in perspective of any comparison objec=
t,=20
> but it can't. The ones storing the iterator to the elements expects the=
=20
> iterator to an element to be erased, and it is impossible to acquire such=
=20
> an iterator.
>

Did you try just
    std::set<std::reference_wrapper<S>, std::less<S>> myset;
    myset.insert(std::ref(myobject));
?
That works for me, and AFAICT it doesn't create any excess temporaries=20
anywhere.

=E2=80=93Arthur

P.S.: Feel free to take this to StackOverflow and post a link in this=20
thread. :)

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/899f1f73-f6dd-4eeb-8bc9-2e81a75f719e%40isocpp.or=
g.

------=_Part_3400_595855517.1483573787616
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Tuesday, January 3, 2017 at 4:57:54 PM UTC-8, NDos Dann=
yu wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: =
0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div=
><span style=3D"color:rgb(36,39,41);font-family:Arial,&quot;Helvetica Neue&=
quot;,Helvetica,sans-serif;font-size:15px">=C2=A0I tried to make multiplex =
of=C2=A0</span><code style=3D"padding:1px 5px;font-family:Consolas,Menlo,Mo=
naco,&quot;Lucida Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sa=
ns Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier New&quot;,=
monospace,sans-serif;background-color:rgb(239,240,241);white-space:pre-wrap=
;color:rgb(36,39,41)">std::set</code><span style=3D"color:rgb(36,39,41);fon=
t-family:Arial,&quot;Helvetica Neue&quot;,Helvetica,sans-serif;font-size:15=
px">, named=C2=A0</span><code style=3D"padding:1px 5px;font-family:Consolas=
,Menlo,Monaco,&quot;Lucida Console&quot;,&quot;Liberation Mono&quot;,&quot;=
DejaVu Sans Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier N=
ew&quot;,monospace,sans-serif;background-color:rgb(239,240,241);white-space=
:pre-wrap;color:rgb(36,39,41)">NDos::set_multiplex</code><span style=3D"col=
or:rgb(36,39,41);font-family:Arial,&quot;Helvetica Neue&quot;,Helvetica,san=
s-serif;font-size:15px">, which can view the elements in perspective of var=
ious comparison objects. For example, a set of playing cards could be sorte=
d with rank first and suit second, or suit first and rank second;=C2=A0</sp=
an><code style=3D"padding:1px 5px;font-family:Consolas,Menlo,Monaco,&quot;L=
ucida Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans Mono&quot=
;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier New&quot;,monospace,sa=
ns-serif;background-color:rgb(239,240,241);white-space:pre-wrap;color:rgb(3=
6,39,41)">NDos::set_multiplex</code><span style=3D"color:rgb(36,39,41);font=
-family:Arial,&quot;Helvetica Neue&quot;,Helvetica,sans-serif;font-size:15p=
x">ena<wbr>bles to do this conveniently.=C2=A0</span><code style=3D"padding=
:1px 5px;font-family:Consolas,Menlo,Monaco,&quot;Lucida Console&quot;,&quot=
;Liberation Mono&quot;,&quot;DejaVu Sans Mono&quot;,&quot;Bitstream Vera Sa=
ns Mono&quot;,&quot;Courier New&quot;,monospace,sans-serif;background-color=
:rgb(239,240,241);white-space:pre-wrap;color:rgb(36,39,41)">NDos::set_<wbr>=
multiplex</code><span style=3D"color:rgb(36,39,41);font-family:Arial,&quot;=
Helvetica Neue&quot;,Helvetica,sans-serif;font-size:15px">=C2=A0does this b=
y inheriting a</span><span style=3D"color:rgb(36,39,41);font-family:Arial,&=
quot;Helvetica Neue&quot;,Helvetica,sans-serif;font-size:15px">=C2=A0</span=
><code style=3D"padding:1px 5px;font-family:Consolas,Menlo,Monaco,&quot;Luc=
ida Console&quot;,&quot;Liberation Mono&quot;,&quot;DejaVu Sans Mono&quot;,=
&quot;Bitstream Vera Sans Mono&quot;,&quot;Courier New&quot;,monospace,sans=
-serif;background-color:rgb(239,240,241);white-space:pre-wrap;color:rgb(36,=
39,41)">std::set</code><span style=3D"color:rgb(36,39,41);font-family:Arial=
,&quot;Helvetica Neue&quot;,Helvetica,sans-serif;font-size:15px">=C2=A0stor=
ing the elements, and multiple=C2=A0</span><code style=3D"padding:1px 5px;f=
ont-family:Consolas,Menlo,Monaco,&quot;Lucida Console&quot;,&quot;Liberatio=
n Mono&quot;,&quot;DejaVu Sans Mono&quot;,&quot;Bitstream Vera Sans Mono&qu=
ot;,&quot;Courier New&quot;,monospace,sans-serif;background-color:rgb(239,2=
40,241);white-space:pre-wrap;color:rgb(36,39,41)">std::multiset</code><span=
 style=3D"color:rgb(36,39,41);font-family:Arial,&quot;Helvetica Neue&quot;,=
Helvetica,sans-serif;font-size:15px">s storing the iterator to the elements=
..</span></div><div><span style=3D"color:rgb(36,39,41);font-family:Arial,&qu=
ot;Helvetica Neue&quot;,Helvetica,sans-serif;font-size:15px">=C2=A0But I go=
t a problem: I couldn&#39;t implement erasure method properly. It should be=
 able to erase an element in perspective of any comparison object, but it c=
an&#39;t. The ones storing the iterator to the elements expects the iterato=
r to an element to be erased, and it is impossible to acquire such an itera=
tor.</span></div></div></blockquote><div><br></div><div>Did you try just</d=
iv><div>=C2=A0 =C2=A0 std::set&lt;std::reference_wrapper&lt;S&gt;, std::les=
s&lt;S&gt;&gt; myset;<br></div><div>=C2=A0 =C2=A0 myset.insert(std::ref(myo=
bject));</div><div>?</div><div>That works for me, and AFAICT it doesn&#39;t=
 create any excess temporaries anywhere.</div><div><br></div><div>=E2=80=93=
Arthur<br></div><div><div><br></div><div>P.S.: Feel free to take this to St=
ackOverflow and post a link in this thread. :)</div></div></div>

<p></p>

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

------=_Part_3400_595855517.1483573787616--

------=_Part_3399_464524956.1483573787616--

.


Author: NDos Dannyu <ndospark320@naver.com>
Date: Wed, 4 Jan 2017 20:39:54 -0800 (PST)
Raw View
------=_Part_4038_1676392454.1483591195011
Content-Type: multipart/alternative;
 boundary="----=_Part_4039_69671933.1483591195011"

------=_Part_4039_69671933.1483591195011
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



2017=EB=85=84 1=EC=9B=94 5=EC=9D=BC =EB=AA=A9=EC=9A=94=EC=9D=BC =EC=98=A4=
=EC=A0=84 8=EC=8B=9C 49=EB=B6=84 47=EC=B4=88 UTC+9, arthur...@mixpanel.com =
=EB=8B=98=EC=9D=98 =EB=A7=90:
>
> Did you try just
>     std::set<std::reference_wrapper<S>, std::less<S>> myset;
>     myset.insert(std::ref(myobject));
> ?
> That works for me, and AFAICT it doesn't create any excess temporaries=20
> anywhere.
>
> =E2=80=93Arthur
>
> P.S.: Feel free to take this to StackOverflow and post a link in this=20
> thread. :)
>
No. I just tried std::multiset<T&>. And of course it failed, because there=
=20
is no allocator of references.
And this thread is actually from Stack Overflow question I posted:=20
http://stackoverflow.com/questions/41392779/parameter-pack-expansion-doesnt=
-work
( Bad rating, :( )

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/229ec2a5-8cf7-4b30-9a65-ef7cd6d62b71%40isocpp.or=
g.

------=_Part_4039_69671933.1483591195011
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>2017=EB=85=84 1=EC=9B=94 5=EC=9D=BC =EB=AA=A9=EC=
=9A=94=EC=9D=BC =EC=98=A4=EC=A0=84 8=EC=8B=9C 49=EB=B6=84 47=EC=B4=88 UTC+9=
, arthur...@mixpanel.com =EB=8B=98=EC=9D=98 =EB=A7=90:<blockquote class=3D"=
gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc so=
lid;padding-left: 1ex;"><div dir=3D"ltr"><div>Did you try just</div><div>=
=C2=A0 =C2=A0 std::set&lt;std::reference_<wbr>wrapper&lt;S&gt;, std::less&l=
t;S&gt;&gt; myset;<br></div><div>=C2=A0 =C2=A0 myset.insert(std::ref(<wbr>m=
yobject));</div><div>?</div><div>That works for me, and AFAICT it doesn&#39=
;t create any excess temporaries anywhere.</div><div><br></div><div>=E2=80=
=93Arthur<br></div><div><div><br></div><div>P.S.: Feel free to take this to=
 StackOverflow and post a link in this thread. :)</div></div></div></blockq=
uote><div>No. I just tried std::multiset&lt;T&amp;&gt;. And of course it fa=
iled, because there is no allocator of references.</div><div>And this threa=
d is actually from Stack Overflow question I posted: <a href=3D"http://stac=
koverflow.com/questions/41392779/parameter-pack-expansion-doesnt-work">http=
://stackoverflow.com/questions/41392779/parameter-pack-expansion-doesnt-wor=
k</a></div><div>( Bad rating, :( )</div></div>

<p></p>

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

------=_Part_4039_69671933.1483591195011--

------=_Part_4038_1676392454.1483591195011--

.


Author: "D. B." <db0451@gmail.com>
Date: Thu, 5 Jan 2017 08:36:09 +0000
Raw View
--047d7b86e2f808fd3d054554cb56
Content-Type: text/plain; charset=UTF-8

Arrays and containers of references are forbidden altogether, as a
fundamental rule - not because there's no allocator written for references
yet.

If you had an array or container of references, there'd be no way to tell
whether an indexing or arithmetic operation should act upon the element (or
its storage) - or the thing to which it referred. (Using a struct that
itself has a reference as its only member works around this because then
you must disambiguate the names.) There are other reasons, but this is
perhaps the most convincing one to me - and the one I see the least.

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

--047d7b86e2f808fd3d054554cb56
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Arrays and containers of references are forbidden alt=
ogether, as a fundamental rule - not because there&#39;s no allocator writt=
en for references yet.<br><br></div>If you had an array or container of ref=
erences, there&#39;d be no way to tell whether an indexing or arithmetic op=
eration should act upon the element (or its storage) - or the thing to whic=
h it referred. (Using a struct that itself has a reference as its only memb=
er works around this because then you must disambiguate the names.) There a=
re other reasons, but this is perhaps the most convincing one to me - and t=
he one I see the least.<br></div>

<p></p>

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

--047d7b86e2f808fd3d054554cb56--

.


Author: NDos Dannyu <ndospark320@naver.com>
Date: Thu, 5 Jan 2017 22:02:39 -0800 (PST)
Raw View
------=_Part_495_200636913.1483682559293
Content-Type: multipart/alternative;
 boundary="----=_Part_496_1555700563.1483682559294"

------=_Part_496_1555700563.1483682559294
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

2017=EB=85=84 1=EC=9B=94 4=EC=9D=BC =EC=88=98=EC=9A=94=EC=9D=BC =EC=98=A4=
=EC=A0=84 10=EC=8B=9C 40=EB=B6=84 34=EC=B4=88 UTC+9, Thiago Macieira =EB=8B=
=98=EC=9D=98 =EB=A7=90:
>
> You can do that with a container of pointers, only that you have to=20
> dereference the pointer before accessing the data. I think this conveys=
=20
> more=20
> information, including the fact that the ownership of the data is unclear=
=20
> and=20
> that the container doesn't own anything at all.=20
>
It turns out it is also impossible to acquire such pointer.=20

2017=EB=85=84 1=EC=9B=94 5=EC=9D=BC =EB=AA=A9=EC=9A=94=EC=9D=BC =EC=98=A4=
=ED=9B=84 5=EC=8B=9C 36=EB=B6=84 11=EC=B4=88 UTC+9, D. B. =EB=8B=98=EC=9D=
=98 =EB=A7=90:
>
> Arrays and containers of references are forbidden altogether, as a=20
> fundamental rule - not because there's no allocator written for reference=
s=20
> yet.
>
> If you had an array or container of references, there'd be no way to tell=
=20
> whether an indexing or arithmetic operation should act upon the element (=
or=20
> its storage) - or the thing to which it referred. (Using a struct that=20
> itself has a reference as its only member works around this because then=
=20
> you must disambiguate the names.) There are other reasons, but this is=20
> perhaps the most convincing one to me - and the one I see the least.
>
Then, we can just use different identifier for container of references.=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/0e8a84fb-5d72-458e-b5b7-e28be7da1d4d%40isocpp.or=
g.

------=_Part_496_1555700563.1483682559294
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">2017=EB=85=84 1=EC=9B=94 4=EC=9D=BC =EC=88=98=EC=9A=94=EC=
=9D=BC =EC=98=A4=EC=A0=84 10=EC=8B=9C 40=EB=B6=84 34=EC=B4=88 UTC+9, Thiago=
 Macieira =EB=8B=98=EC=9D=98 =EB=A7=90:<blockquote class=3D"gmail_quote" st=
yle=3D"margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204)=
; padding-left: 1ex;">You can do that with a container of pointers, only th=
at you have to=C2=A0<br>dereference the pointer before accessing the data. =
I think this conveys more=C2=A0<br>information, including the fact that the=
 ownership of the data is unclear and=C2=A0<br>that the container doesn&#39=
;t own anything at all.=C2=A0<br></blockquote><div>It turns out it is also =
impossible to acquire such pointer.=C2=A0</div><br>2017=EB=85=84 1=EC=9B=94=
 5=EC=9D=BC =EB=AA=A9=EC=9A=94=EC=9D=BC =EC=98=A4=ED=9B=84 5=EC=8B=9C 36=EB=
=B6=84 11=EC=B4=88 UTC+9, D. B. =EB=8B=98=EC=9D=98 =EB=A7=90:<blockquote cl=
ass=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px =
#ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div>Arrays and containers =
of references are forbidden altogether, as a fundamental rule - not because=
 there&#39;s no allocator written for references yet.<br><br></div>If you h=
ad an array or container of references, there&#39;d be no way to tell wheth=
er an indexing or arithmetic operation should act upon the element (or its =
storage) - or the thing to which it referred. (Using a struct that itself h=
as a reference as its only member works around this because then you must d=
isambiguate the names.) There are other reasons, but this is perhaps the mo=
st convincing one to me - and the one I see the least.<br></div></blockquot=
e><div>Then, we can just use different identifier for container of referenc=
es.=C2=A0</div></div>

<p></p>

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

------=_Part_496_1555700563.1483682559294--

------=_Part_495_200636913.1483682559293--

.


Author: NDos Dannyu <ndospark320@naver.com>
Date: Thu, 5 Jan 2017 22:20:42 -0800 (PST)
Raw View
------=_Part_443_144908792.1483683642708
Content-Type: multipart/alternative;
 boundary="----=_Part_444_1669979913.1483683642708"

------=_Part_444_1669979913.1483683642708
Content-Type: text/plain; charset=UTF-8

....I'll try using std::reference_wrapper, anyway.

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

------=_Part_444_1669979913.1483683642708
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">...I&#39;ll try using std::reference_wrapper, anyway.</div=
>

<p></p>

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

------=_Part_444_1669979913.1483683642708--

------=_Part_443_144908792.1483683642708--

.


Author: "D. B." <db0451@gmail.com>
Date: Fri, 6 Jan 2017 08:43:35 +0000
Raw View
--94eb2c074a04840d83054569031d
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Fri, Jan 6, 2017 at 6:02 AM, NDos Dannyu <ndospark320@naver.com> wrote:

> Then, we can just use different identifier for container of references.
>
> I don't know what you mean, but either way, I don't think it's as
easy/possible as you're implying.

But by all means, if you figure out a way to implement this in an existing
compiler, please post the results.

On Fri, Jan 6, 2017 at 6:02 AM, NDos Dannyu <ndospark320@naver.com> wrote:

> 2017=EB=85=84 1=EC=9B=94 4=EC=9D=BC =EC=88=98=EC=9A=94=EC=9D=BC =EC=98=A4=
=EC=A0=84 10=EC=8B=9C 40=EB=B6=84 34=EC=B4=88 UTC+9, Thiago Macieira =EB=8B=
=98=EC=9D=98 =EB=A7=90:
>>
>> You can do that with a container of pointers, only that you have to
>> dereference the pointer before accessing the data. I think this conveys
>> more
>> information, including the fact that the ownership of the data is unclea=
r
>> and
>> that the container doesn't own anything at all.
>>
> It turns out it is also impossible to acquire such pointer.
>
> 2017=EB=85=84 1=EC=9B=94 5=EC=9D=BC =EB=AA=A9=EC=9A=94=EC=9D=BC =EC=98=A4=
=ED=9B=84 5=EC=8B=9C 36=EB=B6=84 11=EC=B4=88 UTC+9, D. B. =EB=8B=98=EC=9D=
=98 =EB=A7=90:
>>
>> Arrays and containers of references are forbidden altogether, as a
>> fundamental rule - not because there's no allocator written for referenc=
es
>> yet.
>>
>> If you had an array or container of references, there'd be no way to tel=
l
>> whether an indexing or arithmetic operation should act upon the element =
(or
>> its storage) - or the thing to which it referred. (Using a struct that
>> itself has a reference as its only member works around this because then
>> you must disambiguate the names.) There are other reasons, but this is
>> perhaps the most convincing one to me - and the one I see the least.
>>
> Then, we can just use different identifier for container of references.
>
> --
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> To view this discussion on the web visit https://groups.google.com/a/
> isocpp.org/d/msgid/std-proposals/0e8a84fb-5d72-458e-
> b5b7-e28be7da1d4d%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/0e8a84fb-5d=
72-458e-b5b7-e28be7da1d4d%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>

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

--94eb2c074a04840d83054569031d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On F=
ri, Jan 6, 2017 at 6:02 AM, NDos Dannyu <span dir=3D"ltr">&lt;<a href=3D"ma=
ilto:ndospark320@naver.com" target=3D"_blank">ndospark320@naver.com</a>&gt;=
</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .=
8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><span cla=
ss=3D""></span><div>Then, we can just use different identifier for containe=
r of references.=C2=A0</div></div><span class=3D"">

<p></p>

</span></blockquote></div>I don&#39;t know what you mean, but either way, I=
 don&#39;t think it&#39;s as easy/possible as you&#39;re implying.<br><br><=
/div><div class=3D"gmail_extra">But by all means, if you figure out a way t=
o implement this in an existing compiler, please post the results.<br></div=
></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Fri, Ja=
n 6, 2017 at 6:02 AM, NDos Dannyu <span dir=3D"ltr">&lt;<a href=3D"mailto:n=
dospark320@naver.com" target=3D"_blank">ndospark320@naver.com</a>&gt;</span=
> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">2017=EB=85=84 1=
=EC=9B=94 4=EC=9D=BC =EC=88=98=EC=9A=94=EC=9D=BC =EC=98=A4=EC=A0=84 10=EC=
=8B=9C 40=EB=B6=84 34=EC=B4=88 UTC+9, Thiago Macieira =EB=8B=98=EC=9D=98 =
=EB=A7=90:<span class=3D""><blockquote class=3D"gmail_quote" style=3D"margi=
n:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex=
">You can do that with a container of pointers, only that you have to=C2=A0=
<br>dereference the pointer before accessing the data. I think this conveys=
 more=C2=A0<br>information, including the fact that the ownership of the da=
ta is unclear and=C2=A0<br>that the container doesn&#39;t own anything at a=
ll.=C2=A0<br></blockquote></span><div>It turns out it is also impossible to=
 acquire such pointer.=C2=A0</div><br>2017=EB=85=84 1=EC=9B=94 5=EC=9D=BC =
=EB=AA=A9=EC=9A=94=EC=9D=BC =EC=98=A4=ED=9B=84 5=EC=8B=9C 36=EB=B6=84 11=EC=
=B4=88 UTC+9, D. B. =EB=8B=98=EC=9D=98 =EB=A7=90:<span class=3D""><blockquo=
te class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>Arrays and containers =
of references are forbidden altogether, as a fundamental rule - not because=
 there&#39;s no allocator written for references yet.<br><br></div>If you h=
ad an array or container of references, there&#39;d be no way to tell wheth=
er an indexing or arithmetic operation should act upon the element (or its =
storage) - or the thing to which it referred. (Using a struct that itself h=
as a reference as its only member works around this because then you must d=
isambiguate the names.) There are other reasons, but this is perhaps the mo=
st convincing one to me - and the one I see the least.<br></div></blockquot=
e></span><div>Then, we can just use different identifier for container of r=
eferences.=C2=A0</div></div><span class=3D"">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>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></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/0e8a84fb-5d72-458e-b5b7-e28be7da1d4d%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/0e8a=
84fb-5d72-458e-<wbr>b5b7-e28be7da1d4d%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></div>

<p></p>

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

--94eb2c074a04840d83054569031d--

.


Author: NDos Dannyu <ndospark320@naver.com>
Date: Sat, 7 Jan 2017 04:14:54 -0800 (PST)
Raw View
------=_Part_1665_1531212232.1483791295097
Content-Type: multipart/alternative;
 boundary="----=_Part_1666_1915341205.1483791295097"

------=_Part_1666_1915341205.1483791295097
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



2017=EB=85=84 1=EC=9B=94 6=EC=9D=BC =EA=B8=88=EC=9A=94=EC=9D=BC =EC=98=A4=
=ED=9B=84 5=EC=8B=9C 43=EB=B6=84 37=EC=B4=88 UTC+9, D. B. =EB=8B=98=EC=9D=
=98 =EB=A7=90:
>
> But by all means, if you figure out a way to implement this in an existin=
g=20
> compiler, please post the results.
>
 I finally managed to implement this. I made the compare object to compare=
=20
equal objects equal only if I am searching over the container, not=20
inserting to or erasing from the container, and that made erasing a single=
=20
element of std::multimap possible.
 Unfortunately, I lost any usage of this container. There is much better=20
and elegant way to do I want. Actually, I am making a pattern searcher of=
=20
Conways Game of Life. Rather than having multiple associative containers=20
anytime, I can just copy or move elements from std::set to std::multiset=20
only if needed.
 So, I am withdrawing this discussion, and I am not going to show the=20
result of a horrible waste of time.

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

------=_Part_1666_1915341205.1483791295097
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>2017=EB=85=84 1=EC=9B=94 6=EC=9D=BC =EA=B8=88=EC=
=9A=94=EC=9D=BC =EC=98=A4=ED=9B=84 5=EC=8B=9C 43=EB=B6=84 37=EC=B4=88 UTC+9=
, D. B. =EB=8B=98=EC=9D=98 =EB=A7=90:<blockquote class=3D"gmail_quote" styl=
e=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left:=
 1ex;"><div dir=3D"ltr"><div>But by all means, if you figure out a way to i=
mplement this in an existing compiler, please post the results.</div></div>=
</blockquote><div>=C2=A0I finally managed to implement this. I made the com=
pare object to compare equal objects equal only if I am searching over the =
container, not inserting to or erasing from the container, and that made er=
asing a single element of std::multimap possible.</div><div>=C2=A0Unfortuna=
tely, I lost any usage of this container. There is much better and elegant =
way to do I want. Actually, I am making a pattern searcher of Conways Game =
of Life. Rather than having multiple associative containers anytime, I can =
just copy or move elements from std::set to std::multiset only if needed.</=
div><div>=C2=A0So, I am withdrawing this discussion, and I am not going to =
show the result of a horrible waste of time.</div></div>

<p></p>

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

------=_Part_1666_1915341205.1483791295097--

------=_Part_1665_1531212232.1483791295097--

.