stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r450906 - in /incubator/stdcxx/trunk/include: deque list map set string vector
Date Thu, 28 Sep 2006 15:49:52 GMT
Author: faridz
Date: Thu Sep 28 08:49:51 2006
New Revision: 450906

URL: http://svn.apache.org/viewvc?view=rev&rev=450906
Log:
2006-09-28 Farid Zaripov <faridz@kyiv.vdiweb.com>

	* deque: Added #ifndef _RWSTD_NO_PART_SPEC_OVERLOAD/#endif around the
	function std::swap<T, A> (std::deque<T, A>&, std::deque<T, A>&);
	[_RWSTD_NO_PART_SPEC_OVERLOAD]: Added function std::swap
	(std::deque&, std::deque&)
	* list [_RWSTD_NO_PART_SPEC_OVERLOAD]: Added function
	std::swap (std::list&, std::list&)
	* map [_RWSTD_NO_PART_SPEC_OVERLOAD]: Added functions
	std::swap (std::map&, std::map&) and
	std::swap (std::multimap&, std::multimap&)
	* set [_RWSTD_NO_PART_SPEC_OVERLOAD]: Added functions
	std::swap (std::set&, std::set&) and
	std::swap (std::multiset&, std::multiset&)
	* string [_RWSTD_NO_PART_SPEC_OVERLOAD]: Added function
	std::swap (std::string&, std::string&)
	* vector [_RWSTD_NO_PART_SPEC_OVERLOAD]: Added functions
	std::swap (std::vector&, std::vector&) and
	std::swap (std::vector<bool>&, std::vector<bool>&)

Modified:
    incubator/stdcxx/trunk/include/deque
    incubator/stdcxx/trunk/include/list
    incubator/stdcxx/trunk/include/map
    incubator/stdcxx/trunk/include/set
    incubator/stdcxx/trunk/include/string
    incubator/stdcxx/trunk/include/vector

Modified: incubator/stdcxx/trunk/include/deque
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/deque?view=diff&rev=450906&r1=450905&r2=450906
==============================================================================
--- incubator/stdcxx/trunk/include/deque (original)
+++ incubator/stdcxx/trunk/include/deque Thu Sep 28 08:49:51 2006
@@ -7,36 +7,26 @@
  *
  ***************************************************************************
  *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- ***************************************************************************
- *
- * Copyright 2005-2006 The Apache Software Foundation or its licensors,
- * as applicable.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
  *
  * Copyright 1994-2006 Rogue Wave Software.
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Copyright (c) 1994 Hewlett-Packard Company
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
  **************************************************************************/
 
 #ifndef _RWSTD_DEQUE_INCLUDED
@@ -651,6 +641,13 @@
         _RWSTD_ASSERT (_C_is_valid (1 /* valid and empty */));
     }
 
+#if defined (_RWSTD_NO_PART_SPEC_OVERLOAD)
+    friend void swap (deque& __lhs, deque& __rhs) {
+        __lhs.swap (__rhs);
+    }
+#endif
+
+
 private:
 
     //////////////////////////////////////////////////////////////////
@@ -983,6 +980,8 @@
 }
 
 
+#ifndef _RWSTD_NO_PART_SPEC_OVERLOAD
+
 template <class _TypeT, class _Allocator>
 inline void
 swap (deque<_TypeT, _Allocator> &__lhs, deque<_TypeT, _Allocator> &__rhs)
@@ -990,6 +989,7 @@
     __lhs.swap (__rhs);
 }
 
+#endif   // _RWSTD_NO_PART_SPEC_OVERLOAD
 
 }   // namespace end
 

Modified: incubator/stdcxx/trunk/include/list
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/list?view=diff&rev=450906&r1=450905&r2=450906
==============================================================================
--- incubator/stdcxx/trunk/include/list (original)
+++ incubator/stdcxx/trunk/include/list Thu Sep 28 08:49:51 2006
@@ -7,29 +7,25 @@
  *
  ***************************************************************************
  *
- * Copyright (c) 1994
- * Hewlett-Packard Company
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
  *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
+ * Copyright 1994-2005 Rogue Wave Software.
  *
- ***************************************************************************
- *
- * Copyright (c) 1994-2005 Quovadx,  Inc., acting through its  Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License");  you may  not use this file except  in compliance with the
- * License.    You    may   obtain   a   copy   of    the   License    at
- * http://www.apache.org/licenses/LICENSE-2.0.    Unless   required    by
- * applicable law  or agreed to  in writing,  software  distributed under
- * the License is distributed on an "AS IS" BASIS,  WITHOUT WARRANTIES OR
- * CONDITIONS OF  ANY KIND, either  express or implied.  See  the License
- * for the specific language governing permissions  and limitations under
- * the License.
+ * Copyright (c) 1994 Hewlett-Packard Company
  * 
  **************************************************************************/
 
@@ -663,6 +659,12 @@
     void clear () {
         erase (begin (), end ());
     }
+
+#if defined (_RWSTD_NO_PART_SPEC_OVERLOAD)
+    friend void swap (list& __lhs, list& __rhs) {
+        __lhs.swap (__rhs);
+    }
+#endif
 
 protected:
     

Modified: incubator/stdcxx/trunk/include/map
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/map?view=diff&rev=450906&r1=450905&r2=450906
==============================================================================
--- incubator/stdcxx/trunk/include/map (original)
+++ incubator/stdcxx/trunk/include/map Thu Sep 28 08:49:51 2006
@@ -7,35 +7,25 @@
  *
  ***************************************************************************
  *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- ***************************************************************************
- *
- * Copyright 2005-2006 The Apache Software Foundation or its licensors,
- * as applicable.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
  *
  * Copyright 1994-2006 Rogue Wave Software.
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 1994 Hewlett-Packard Company
  * 
  **************************************************************************/
 
@@ -300,6 +290,13 @@
     equal_range (const key_type& __x) const {
         return _C_rep.equal_range (__x);
     }
+
+#if defined (_RWSTD_NO_PART_SPEC_OVERLOAD)
+    friend void swap (map& __lhs, map& __rhs) {
+        __lhs.swap (__rhs);
+    }
+#endif
+
 };
 
 
@@ -529,6 +526,13 @@
     equal_range (const key_type& __x) const {
         return _C_rep.equal_range (__x);
     }
+
+#if defined (_RWSTD_NO_PART_SPEC_OVERLOAD)
+    friend void swap (multimap& __lhs, multimap& __rhs) {
+        __lhs.swap (__rhs);
+    }
+#endif
+
 };
 
 

Modified: incubator/stdcxx/trunk/include/set
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/set?view=diff&rev=450906&r1=450905&r2=450906
==============================================================================
--- incubator/stdcxx/trunk/include/set (original)
+++ incubator/stdcxx/trunk/include/set Thu Sep 28 08:49:51 2006
@@ -7,35 +7,25 @@
  *
  ***************************************************************************
  *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- ***************************************************************************
- *
- * Copyright 2005-2006 The Apache Software Foundation or its licensors,
- * as applicable.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
  *
  * Copyright 1994-2006 Rogue Wave Software.
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 1994 Hewlett-Packard Company
  * 
  **************************************************************************/
 
@@ -301,6 +291,13 @@
     equal_range (const key_type& __x) const {
         return _C_rep.equal_range (__x);
     }
+
+#if defined (_RWSTD_NO_PART_SPEC_OVERLOAD)
+    friend void swap (set& __lhs, set& __rhs) {
+        __lhs.swap (__rhs);
+    }
+#endif
+
 };
 
 
@@ -505,6 +502,13 @@
     equal_range (const key_type& __x) const {
         return _C_rep.equal_range (__x);
     }
+
+#if defined (_RWSTD_NO_PART_SPEC_OVERLOAD)
+    friend void swap (multiset& __lhs, multiset& __rhs) {
+        __lhs.swap (__rhs);
+    }
+#endif
+
 };
 
 

Modified: incubator/stdcxx/trunk/include/string
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/string?view=diff&rev=450906&r1=450905&r2=450906
==============================================================================
--- incubator/stdcxx/trunk/include/string (original)
+++ incubator/stdcxx/trunk/include/string Thu Sep 28 08:49:51 2006
@@ -7,17 +7,24 @@
  *
  ***************************************************************************
  *
- * Copyright (c) 1994-2005 Quovadx,  Inc., acting through its  Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License");  you may  not use this file except  in compliance with the
- * License.    You    may   obtain   a   copy   of    the   License    at
- * http://www.apache.org/licenses/LICENSE-2.0.    Unless   required    by
- * applicable law  or agreed to  in writing,  software  distributed under
- * the License is distributed on an "AS IS" BASIS,  WITHOUT WARRANTIES OR
- * CONDITIONS OF  ANY KIND, either  express or implied.  See  the License
- * for the specific language governing permissions  and limitations under
- * the License.
- * 
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
+ *
  **************************************************************************/
 
 #ifndef _RWSTD_STRING_INCLUDED
@@ -822,6 +829,12 @@
 
     // lwg Issue 5
     int compare (size_type, size_type, const_pointer, size_type) const;
+
+#if defined (_RWSTD_NO_PART_SPEC_OVERLOAD)
+    friend void swap (basic_string& __lhs, basic_string& __rhs) {
+        __lhs.swap (__rhs);
+    }
+#endif
 
 #if    !defined (_RWSTD_NO_INLINE_MEMBER_TEMPLATES)                            \
     && (!defined (_MSC_VER) || _MSC_VER >= 1300 || defined (__INTEL_COMPILER))
\

Modified: incubator/stdcxx/trunk/include/vector
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/vector?view=diff&rev=450906&r1=450905&r2=450906
==============================================================================
--- incubator/stdcxx/trunk/include/vector (original)
+++ incubator/stdcxx/trunk/include/vector Thu Sep 28 08:49:51 2006
@@ -7,35 +7,25 @@
  *
  ***************************************************************************
  *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- ***************************************************************************
- *
- * Copyright 2006 The Apache Software Foundation or its licensors,
- * as applicable.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
  *
  * Copyright 1994-2006 Rogue Wave Software.
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 1994 Hewlett-Packard Company
  * 
  **************************************************************************/
 
@@ -370,6 +360,12 @@
         erase (begin (), end ());
     }
 
+#if defined (_RWSTD_NO_PART_SPEC_OVERLOAD)
+    friend void swap (vector& __lhs, vector& __rhs) {
+        __lhs.swap (__rhs);
+    }
+#endif
+
 private:
 
     // implements assign with repetition
@@ -1432,6 +1428,13 @@
     {
       erase(begin(),end());
     }
+
+#if defined (_RWSTD_NO_PART_SPEC_OVERLOAD)
+    friend void swap (vector& __lhs, vector& __rhs) {
+        __lhs.swap (__rhs);
+    }
+#endif
+
 };
 
 #undef _Allocator 



Mime
View raw message