diff options
author | Adam Mitz <mitza-oci@users.noreply.github.com> | 2007-07-02 16:01:46 +0000 |
---|---|---|
committer | Adam Mitz <mitza-oci@users.noreply.github.com> | 2007-07-02 16:01:46 +0000 |
commit | 20f88095faa4893394db77cb71f5226f4df48ac6 (patch) | |
tree | f20624479ad75a360a8dd045815139e5e9365707 /ACE/ace | |
parent | 707eb46d9cf96abcdd77f9555d8b47f177bdebc5 (diff) | |
download | ATCD-20f88095faa4893394db77cb71f5226f4df48ac6.tar.gz |
ChangeLogTag: Mon Jul 2 15:59:28 UTC 2007 Adam Mitz <mitza@ociweb.com>
Diffstat (limited to 'ACE/ace')
-rw-r--r-- | ACE/ace/Vector_T.h | 2 | ||||
-rw-r--r-- | ACE/ace/Vector_T.inl | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/ACE/ace/Vector_T.h b/ACE/ace/Vector_T.h index b82ea62b90e..d6a6b455099 100644 --- a/ACE/ace/Vector_T.h +++ b/ACE/ace/Vector_T.h @@ -185,6 +185,8 @@ public: */ bool operator!= (const ACE_Vector<T, DEFAULT_SIZE> &s) const; + void swap (ACE_Vector &rhs); + protected: /** diff --git a/ACE/ace/Vector_T.inl b/ACE/ace/Vector_T.inl index aef981b447d..f9388daf619 100644 --- a/ACE/ace/Vector_T.inl +++ b/ACE/ace/Vector_T.inl @@ -2,6 +2,8 @@ // // $Id$ +#include <algorithm> + ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <class T, size_t DEFAULT_SIZE> ACE_INLINE @@ -51,6 +53,15 @@ ACE_Vector<T, DEFAULT_SIZE>::operator!= (const ACE_Vector<T, DEFAULT_SIZE> &s) c return !(*this == s); } +template <class T, size_t DEFAULT_SIZE> ACE_INLINE void +ACE_Vector<T, DEFAULT_SIZE>::swap (ACE_Vector &rhs) +{ + ACE_Array<T>::swap (rhs); + std::swap (this->length_, rhs.length_); + std::swap (this->curr_max_size_, rhs.curr_max_size_); +} + + // **************************************************************** template <class T, size_t DEFAULT_SIZE> ACE_INLINE void |