[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++ / multiple instances / iostreams
From: |
Detlef Vollmann |
Subject: |
Re: C++ / multiple instances / iostreams |
Date: |
Mon, 26 Jul 2004 00:29:56 +0200 |
Hans Aberg wrote:
> At 23:28 +0200 2004/07/24, Detlef Vollmann wrote:
> >23.2.1.3p1 explicitely requires that no references to elements
> >in a deque are invalidated on an insert at the end or beginning.
> >This effectively forbids reallocation.
>
> OK. They have then added some extra conditions on the notion of a deque.
Agreed, the name just reflects the different interface
(you also have push/pop_front), while for me the main
difference is in the implementation. I often use std::deque
just because this different implementation, even if I don't
need the double-ended interface.
> >23.2.4p1 requires "The elements of a vector are stored contiguously",
> >this effectively requires reallocation if the vector needs to grow.
>
> My copy of the standard does not say that. In fact, I could not find the
> word contiguous in the containers section.
Though a vector was always meant to be contiguous, it was forgotten
in the original text. This is the theme of one of the earliest
defect reports
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#69
It's part of the Technical Corrigendum (TC1), and therefore
part of the second edition ISO/IEC 14882:2003(E), sometimes
called C++03.
Detlef
--
Detlef Vollmann vollmann engineering gmbh
Linux and C++ for Embedded Systems http://www.vollmann.ch/
- Re: C++ / multiple instances / iostreams, (continued)
- Re: C++ / multiple instances / iostreams, Detlef Vollmann, 2004/07/21
- Re: C++ / multiple instances / iostreams, Hans Aberg, 2004/07/22
- Re: C++ / multiple instances / iostreams, Detlef Vollmann, 2004/07/23
- Re: C++ / multiple instances / iostreams, Hans Aberg, 2004/07/23
- Re: C++ / multiple instances / iostreams, Detlef Vollmann, 2004/07/24
- Re: C++ / multiple instances / iostreams, Hans Aberg, 2004/07/24
- Re: C++ / multiple instances / iostreams, Detlef Vollmann, 2004/07/24
- Re: C++ / multiple instances / iostreams, Hans Aberg, 2004/07/24
- Re: C++ / multiple instances / iostreams, Detlef Vollmann, 2004/07/24
- Re: C++ / multiple instances / iostreams, Hans Aberg, 2004/07/25
- Re: C++ / multiple instances / iostreams,
Detlef Vollmann <=
- Re: C++ / multiple instances / iostreams, Hans Aberg, 2004/07/26
- Re: C++ / multiple instances / iostreams, Detlef Vollmann, 2004/07/26
- Re: C++ / multiple instances / iostreams, Hans Aberg, 2004/07/27
- Re: C++ / multiple instances / iostreams, Detlef Vollmann, 2004/07/28
- Re: C++ / multiple instances / iostreams, Hans Aberg, 2004/07/28
- Re: C++ / multiple instances / iostreams, Hans Aberg, 2004/07/22
- Re: C++ / multiple instances / iostreams, Detlef Vollmann, 2004/07/23
- Re: C++ / multiple instances / iostreams, Hans Aberg, 2004/07/23
- Re: C++ / multiple instances / iostreams, Detlef Vollmann, 2004/07/24
- Re: C++ / multiple instances / iostreams, Hans Aberg, 2004/07/24