Topic: Spec. for emplace_hint for assoc. containers


Author: Scott Meyers <NeverRead@aristeia.com>
Date: Wed, 10 Feb 2010 11:54:55 CST
Raw View
The first row of Table 96 on page 709 of N3000 says that the emplacement
location hint p improves efficiency if the new element is inserted right AFTER
p.  The last row of the table on that same page says that the insertion location
hint p improves efficiency if the new element is inserted right BEFORE p.  Given
that using an "after" location is meaningless for the end iterator and prevents
hinting at insertion at the beginning of a container, it seems to me that the
first row is incorrect.  (Interestingly, this is essentially the same issue
rejected for C++03 by
http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-closed.html#192 , whereby the
committee decided that having a sensible specification simply didn't matter.)

FWIW, I tried to see if this had already been reported as an issue, but I can't
find a comprehensive list of library issues for C++0x.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n3011.html shows active
issues, but the links at the top of that document to issues with other statuses
(e.g., closed) are broken.

Scott

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: =3D?ISO-8859-1?Q?Daniel_Kr=3DFCgler?=3D <daniel.kruegler@googlemail.c=.om>
Date: Thu, 11 Feb 2010 12:06:19 CST
Raw View
On 10 Feb., 18:54, Scott Meyers <NeverR...@aristeia.com> wrote:
> The first row of Table 96 on page 709 of N3000 says that the emplacement
> location hint p improves efficiency if the new element is inserted right
AFTER
> p.  The last row of the table on that same page says that the insertion
location
> hint p improves efficiency if the new element is inserted right BEFORE p.
 Given
> that using an "after" location is meaningless for the end iterator and
prevents
> hinting at insertion at the beginning of a container, it seems to me that
the
> first row is incorrect.  (Interestingly, this is essentially the same
issue
> rejected for C++03 byhttp://
anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-closed.html#192, whereby the
> committee decided that having a sensible specification simply didn't
matter.)
>
> FWIW, I tried to see if this had already been reported as an issue, but I
can't
> find a comprehensive list of library issues for C++0x.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n3011.htmlshows
active
> issues, but the links at the top of that document to issues with other
statuses
> (e.g., closed) are broken.

This has been recognized as a defect and will (probably) be
part of the resolution for

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n3011.html#1253

or

http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#1253

[No, there is nothing to see yet].

HTH & Greetings from Bremen,

Daniel Kr=FCgler



--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use
mailto:std-c++@netlab.cs.rpi.edu<std-c%2B%2B@netlab.cs.rpi.edu>
]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: achp <achp.ru@gmail.com>
Date: Thu, 11 Feb 2010 12:05:40 CST
Raw View
> FWIW, I tried to see if this had already been reported as an issue, but I
can't
> find a comprehensive list of library issues for C++0x.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n3011.htmlshows
active
> issues, but the links at the top of that document to issues with other
statuses
> (e.g., closed) are broken.

Try removing "papers/2009/" from the URL, like this:
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use
mailto:std-c++@netlab.cs.rpi.edu<std-c%2B%2B@netlab.cs.rpi.edu>
]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]