tmp/tmp1s_8w_jk/{from.md → to.md}
RENAMED
|
@@ -1,17 +1,17 @@
|
|
| 1 |
### Clause [[containers]]: containers library <a id="diff.cpp03.containers">[[diff.cpp03.containers]]</a>
|
| 2 |
|
| 3 |
[[container.requirements]] **Change:** Complexity of `size()` member
|
| 4 |
-
functions now constant **Rationale:** Lack of specification of
|
| 5 |
complexity of `size()` resulted in divergent implementations with
|
| 6 |
inconsistent performance characteristics. **Effect on original
|
| 7 |
feature:** Some container implementations that conform to C++03may not
|
| 8 |
conform to the specified `size()` requirements in this International
|
| 9 |
Standard. Adjusting containers such as `std::list` to the stricter
|
| 10 |
requirements may require incompatible changes.
|
| 11 |
|
| 12 |
-
[[container.requirements]] **Change:** Requirements change: relaxation
|
| 13 |
**Rationale:** Clarification. **Effect on original feature:** Valid
|
| 14 |
C++03code that attempts to meet the specified container requirements may
|
| 15 |
now be over-specified. Code that attempted to be portable across
|
| 16 |
containers may need to be adjusted as follows:
|
| 17 |
|
|
@@ -19,17 +19,17 @@ containers may need to be adjusted as follows:
|
|
| 19 |
`size() == 0`;
|
| 20 |
- not all containers are empty after construction (`array`);
|
| 21 |
- not all containers have constant complexity for `swap()` (`array`).
|
| 22 |
|
| 23 |
[[container.requirements]] **Change:** Requirements change: default
|
| 24 |
-
constructible **Rationale:** Clarification of container requirements.
|
| 25 |
**Effect on original feature:** Valid C++03code that attempts to
|
| 26 |
explicitly instantiate a container using a user-defined type with no
|
| 27 |
default constructor may fail to compile.
|
| 28 |
|
| 29 |
[[sequence.reqmts]], [[associative.reqmts]] **Change:** Signature
|
| 30 |
-
changes: from `void` return types **Rationale:** Old signature threw
|
| 31 |
away useful information that may be expensive to recalculate. **Effect
|
| 32 |
on original feature:** The following member functions have changed:
|
| 33 |
|
| 34 |
- `erase(iter)` for `set`, `multiset`, `map`, `multimap`
|
| 35 |
- `erase(begin, end)` for `set`, `multiset`, `map`, `multimap`
|
|
@@ -39,28 +39,27 @@ on original feature:** The following member functions have changed:
|
|
| 39 |
Valid C++03code that relies on these functions returning `void` (e.g.,
|
| 40 |
code that creates a pointer to member function that points to one of
|
| 41 |
these functions) will fail to compile with this International Standard.
|
| 42 |
|
| 43 |
[[sequence.reqmts]], [[associative.reqmts]] **Change:** Signature
|
| 44 |
-
changes: from `iterator` to `const_iterator` parameters **Rationale:**
|
| 45 |
-
Overspecification. *
|
| 46 |
-
functions changed from taking an `iterator` to taking a
|
| 47 |
`const_iterator`:
|
| 48 |
|
| 49 |
- `insert(iter, val)` for `vector`, `deque`, `list`, `set`, `multiset`,
|
| 50 |
`map`, `multimap`
|
| 51 |
- `insert(pos, beg, end)` for `vector`, `deque`, `list`, `forward_list`
|
| 52 |
-
- `erase(iter)` for `set`, `multiset`, `map`, `multimap`
|
| 53 |
- `erase(begin, end)` for `set`, `multiset`, `map`, `multimap`
|
| 54 |
- all forms of `list::splice`
|
| 55 |
- all forms of `list::merge`
|
| 56 |
|
| 57 |
Valid C++03code that uses these functions may fail to compile with this
|
| 58 |
International Standard.
|
| 59 |
|
| 60 |
[[sequence.reqmts]], [[associative.reqmts]] **Change:** Signature
|
| 61 |
-
changes: `resize` **Rationale:** Performance, compatibility with move
|
| 62 |
semantics. **Effect on original feature:** For `vector`, `deque`, and
|
| 63 |
`list` the fill value passed to `resize` is now passed by reference
|
| 64 |
instead of by value, and an additional overload of `resize` has been
|
| 65 |
added. Valid C++03code that uses this function may fail to compile with
|
| 66 |
this International Standard.
|
|
|
|
| 1 |
### Clause [[containers]]: containers library <a id="diff.cpp03.containers">[[diff.cpp03.containers]]</a>
|
| 2 |
|
| 3 |
[[container.requirements]] **Change:** Complexity of `size()` member
|
| 4 |
+
functions now constant. **Rationale:** Lack of specification of
|
| 5 |
complexity of `size()` resulted in divergent implementations with
|
| 6 |
inconsistent performance characteristics. **Effect on original
|
| 7 |
feature:** Some container implementations that conform to C++03may not
|
| 8 |
conform to the specified `size()` requirements in this International
|
| 9 |
Standard. Adjusting containers such as `std::list` to the stricter
|
| 10 |
requirements may require incompatible changes.
|
| 11 |
|
| 12 |
+
[[container.requirements]] **Change:** Requirements change: relaxation.
|
| 13 |
**Rationale:** Clarification. **Effect on original feature:** Valid
|
| 14 |
C++03code that attempts to meet the specified container requirements may
|
| 15 |
now be over-specified. Code that attempted to be portable across
|
| 16 |
containers may need to be adjusted as follows:
|
| 17 |
|
|
|
|
| 19 |
`size() == 0`;
|
| 20 |
- not all containers are empty after construction (`array`);
|
| 21 |
- not all containers have constant complexity for `swap()` (`array`).
|
| 22 |
|
| 23 |
[[container.requirements]] **Change:** Requirements change: default
|
| 24 |
+
constructible. **Rationale:** Clarification of container requirements.
|
| 25 |
**Effect on original feature:** Valid C++03code that attempts to
|
| 26 |
explicitly instantiate a container using a user-defined type with no
|
| 27 |
default constructor may fail to compile.
|
| 28 |
|
| 29 |
[[sequence.reqmts]], [[associative.reqmts]] **Change:** Signature
|
| 30 |
+
changes: from `void` return types. **Rationale:** Old signature threw
|
| 31 |
away useful information that may be expensive to recalculate. **Effect
|
| 32 |
on original feature:** The following member functions have changed:
|
| 33 |
|
| 34 |
- `erase(iter)` for `set`, `multiset`, `map`, `multimap`
|
| 35 |
- `erase(begin, end)` for `set`, `multiset`, `map`, `multimap`
|
|
|
|
| 39 |
Valid C++03code that relies on these functions returning `void` (e.g.,
|
| 40 |
code that creates a pointer to member function that points to one of
|
| 41 |
these functions) will fail to compile with this International Standard.
|
| 42 |
|
| 43 |
[[sequence.reqmts]], [[associative.reqmts]] **Change:** Signature
|
| 44 |
+
changes: from `iterator` to `const_iterator` parameters. **Rationale:**
|
| 45 |
+
Overspecification. **Effect on original feature:** The signatures of the
|
| 46 |
+
following member functions changed from taking an `iterator` to taking a
|
| 47 |
`const_iterator`:
|
| 48 |
|
| 49 |
- `insert(iter, val)` for `vector`, `deque`, `list`, `set`, `multiset`,
|
| 50 |
`map`, `multimap`
|
| 51 |
- `insert(pos, beg, end)` for `vector`, `deque`, `list`, `forward_list`
|
|
|
|
| 52 |
- `erase(begin, end)` for `set`, `multiset`, `map`, `multimap`
|
| 53 |
- all forms of `list::splice`
|
| 54 |
- all forms of `list::merge`
|
| 55 |
|
| 56 |
Valid C++03code that uses these functions may fail to compile with this
|
| 57 |
International Standard.
|
| 58 |
|
| 59 |
[[sequence.reqmts]], [[associative.reqmts]] **Change:** Signature
|
| 60 |
+
changes: `resize`. **Rationale:** Performance, compatibility with move
|
| 61 |
semantics. **Effect on original feature:** For `vector`, `deque`, and
|
| 62 |
`list` the fill value passed to `resize` is now passed by reference
|
| 63 |
instead of by value, and an additional overload of `resize` has been
|
| 64 |
added. Valid C++03code that uses this function may fail to compile with
|
| 65 |
this International Standard.
|