Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.std.c++ > #79

Re: Defect report: missing exception specifications for vector::resize(size_type sz)

Message-ID <imt959$8iu$1@dont-email.me> (permalink)
Newsgroups comp.std.c++
From Daniel Krügler <daniel.kruegler@googlemail.com>
Subject Re: Defect report: missing exception specifications for vector::resize(size_type sz)
Organization A noiseless patient Spider
References <e4712ac1-907b-436b-b79f-a23db9325923@o15g2000prn.googlegroups.com>
Date 2011-03-30 13:05 -0600

Show all headers | View raw


Am 29.03.2011 21:07, schrieb Rani Sharoni:
>
> In C++1x (N3090) there are two version of vector::resize - 23.3.6:
> void resize(size_type sz);
> void resize(size_type sz, const T&  c);
>
> The text in 23.3.6.2/12 only mentions "no effects on throw" for the
> two args version of resize:
> Requires: If an exception is thrown other than by the move constructor
> of a non-CopyConstructible T there are no effects.
>
> This seems like unintentional oversight since resize(size) is
> semantically the same as resize(size, T()).
> Additionally, the C++03 standard only specify single version of resize
> with default for the second argument - 23.2.4:
> void resize(size_type sz, T c = T());
>
> Therefore not requiring same guarantees for both version of resize is
> in fact a regression.

Nikolay Ivchenkov has reported a related issue, see

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

It seems to me that this issue should be used to solve your mentioned
problem as well. Your remark will be forwarded to the library working
group.

Greetings from Bremen,

Daniel Krügler


--
[ comp.std.c++ is moderated.  To submit articles, try posting with your ]
[ newsreader.  If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]

Back to comp.std.c++ | Previous | NextPrevious in thread | Find similar


Thread

Defect report: missing exception specifications for  vector::resize(size_type sz) Rani Sharoni <ranisharoni75@gmail.com> - 2011-03-29 13:07 -0600
  Re: Defect report: missing exception specifications for vector::resize(size_type sz)  Daniel Krügler <daniel.kruegler@googlemail.com> - 2011-03-30 13:05 -0600

csiph-web