Ref T270, push front for sequence and unified "insert" -> "push_back"

Remark: "CSequence::insert" is a synonym "push_back". This makes it clearer that push_back is used.
This commit is contained in:
Klaus Basan
2018-05-28 16:18:18 +02:00
parent abfa12c1ec
commit f7a0c69fc8
4 changed files with 12 additions and 9 deletions

View File

@@ -181,6 +181,9 @@ namespace BlackMisc
//! Insert as first element.
void push_front(const T &value) { insert(begin(), value); }
//! Inserts all elements from another sequence at the beginning of this sequence.
void push_front(const CSequence &other) { std::copy(other.begin(), other.end(), std::front_inserter(*this)); }
//! Insert as first element by keep maxElements
void push_frontMaxElements(const T &value, int maxElements)
{