diff options
| author | Tyge Løvset <[email protected]> | 2021-03-24 14:39:50 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-03-24 14:39:50 +0100 |
| commit | 52f53e8c8ea9320e2af86d6e1a09f1416a73d51c (patch) | |
| tree | 62d5e3001a3476e0b3dea3355446112e820c1ae1 | |
| parent | b1b19bc2e5a2732e59583184bfa18a34052d5ae1 (diff) | |
| download | STC-modified-52f53e8c8ea9320e2af86d6e1a09f1416a73d51c.tar.gz STC-modified-52f53e8c8ea9320e2af86d6e1a09f1416a73d51c.zip | |
More README.md edit.
| -rw-r--r-- | README.md | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -200,19 +200,19 @@ elements using dynamic memory. | push_front() | emplace_front() | cdeq, clist |
| insert_after() | emplace_after() | clist |
-Note these differences between STC and c++ STL maps:
+For containers of integral or trivial element types, **emplace** and corresponding non-emplace
+methods are identical, so the following does not apply for those.
+
+The **emplace** methods ***construct*** or ***clone*** their own copy of the element to be added.
+In contrast, the non-emplace methods requires elements to be explicitly constructed or cloned before adding them.
+
+A few of the differences between STC and c++ STL maps methods are:
| STC maps | C++ STL maps |
|:-------------------------------------|:------------------------------|
| insert(Key, Mapped) | insert(Value) |
| emplace_or_assign(RawKey, RawMapped) | N/A |
-For containers of integral or trivial element types, **emplace** and corresponding
-non-emplace methods are identical, so the following does not apply for those.
-
-The **emplace** methods ***construct*** or ***clone*** their own copy of the element to be added.
-In contrast, the non-emplace methods requires elements to be explicitly constructed or cloned before adding them.
-
Strings are the most commonly used non-trivial data type. STC containers have proper pre-defined
**using**-declarations for cstr-elements, so they are fail-safe to use both with the **emplace**
and non-emplace methods:
|
