mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user