From: Paolo Carlini Date: Wed, 7 Jan 2009 13:00:48 +0000 (+0000) Subject: re PR libstdc++/38466 (Document std::pair vs. std::swap) X-Git-Tag: releases/gcc-4.4.0~986 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8877b5a9bd57107ef369d266c0a276515d2f0987;p=thirdparty%2Fgcc.git re PR libstdc++/38466 (Document std::pair vs. std::swap) 2009-01-07 Paolo Carlini PR libstdc++/38466 * include/bits/stl_pair.h: Document C++03 pair vs swap. From-SVN: r143154 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 11bf44eef6a5..7027b77c44b3 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2009-01-07 Paolo Carlini + + PR libstdc++/38466 + * include/bits/stl_pair.h: Document C++03 pair vs swap. + 2009-01-06 Benjamin Kosnik * src/locale_init.cc (locale::_S_initialize_once): Move construction diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h index cf61b09945a0..eb741e2384e3 100644 --- a/libstdc++-v3/include/bits/stl_pair.h +++ b/libstdc++-v3/include/bits/stl_pair.h @@ -1,6 +1,6 @@ // Pair implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -184,6 +184,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #ifdef __GXX_EXPERIMENTAL_CXX0X__ /// See std::pair::swap(). + // Note: no std::swap overloads in C++03 mode, this has performance + // implications, see, eg, libstdc++/38466. template inline void swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)