forked from boostorg/container
Implemented LWG Issue #149 (range insertion now returns an iterator) & cleaned up insertion code in most containers
[SVN r80348]
This commit is contained in:
1 parent
011f1fb181
commit
3c256c2282
29 files changed
+1659
-1476
No files matched your search
@@ -73,6 +73,12 @@ class movable_int
|
||||
int get_int() const
|
||||
{ return m_int; }
|
||||
|
||||
friend bool operator==(const movable_int &l, int r)
|
||||
{ return l.get_int() == r; }
|
||||
|
||||
friend bool operator==(int l, const movable_int &r)
|
||||
{ return l == r.get_int(); }
|
||||
|
||||
private:
|
||||
int m_int;
|
||||
};
|
||||
@@ -144,6 +150,12 @@ class movable_and_copyable_int
|
||||
int get_int() const
|
||||
{ return m_int; }
|
||||
|
||||
friend bool operator==(const movable_and_copyable_int &l, int r)
|
||||
{ return l.get_int() == r; }
|
||||
|
||||
friend bool operator==(int l, const movable_and_copyable_int &r)
|
||||
{ return l == r.get_int(); }
|
||||
|
||||
private:
|
||||
int m_int;
|
||||
};
|
||||
@@ -202,6 +214,12 @@ class copyable_int
|
||||
int get_int() const
|
||||
{ return m_int; }
|
||||
|
||||
friend bool operator==(const copyable_int &l, int r)
|
||||
{ return l.get_int() == r; }
|
||||
|
||||
friend bool operator==(int l, const copyable_int &r)
|
||||
{ return l == r.get_int(); }
|
||||
|
||||
private:
|
||||
int m_int;
|
||||
};
|
||||
@@ -256,10 +274,17 @@ class non_copymovable_int
|
||||
int get_int() const
|
||||
{ return m_int; }
|
||||
|
||||
friend bool operator==(const non_copymovable_int &l, int r)
|
||||
{ return l.get_int() == r; }
|
||||
|
||||
friend bool operator==(int l, const non_copymovable_int &r)
|
||||
{ return l == r.get_int(); }
|
||||
|
||||
private:
|
||||
int m_int;
|
||||
};
|
||||
|
||||
|
||||
} //namespace test {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
Reference in new issue
Block a user