This just updates some comments to refer to the section numbers in the final C++11 standard.
* acinclude.m4: Update references to final C++11 standard. * include/bits/shared_ptr.h: Likewise. * include/bits/shared_ptr_base.h: Likewise. * include/bits/unique_ptr.h: Likewise. * include/std/chrono: Likewise. * include/std/thread: Likewise. Tested x86_64-linux, committed to trunk.
commit 0d6bc17d16d85865ed4b6deffd455d3e1e12f430 Author: Jonathan Wakely <jwakely....@gmail.com> Date: Thu Aug 9 23:21:27 2012 +0100 * acinclude.m4: Update references to final C++11 standard. * include/bits/shared_ptr.h: Likewise. * include/bits/shared_ptr_base.h: Likewise. * include/bits/unique_ptr.h: Likewise. * include/std/chrono: Likewise. * include/std/thread: Likewise. diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 6632725..1179407 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1115,16 +1115,16 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [ dnl dnl Check for clock_gettime, nanosleep and sched_yield, used in the -dnl implementation of 20.8.5 [time.clock], and 30.2.2 [thread.thread.this] -dnl in the current C++0x working draft. +dnl implementation of 20.11.7 [time.clock], and 30.3.2 [thread.thread.this] +dnl in the C++11 standard. dnl dnl --enable-libstdcxx-time dnl --enable-libstdcxx-time=yes dnl checks for the availability of monotonic and realtime clocks, -dnl nanosleep and sched_yield in libc and libposix4 and, in case, links -dnl the latter +dnl nanosleep and sched_yield in libc and libposix4 and, if needed, +dnl links in the latter. dnl --enable-libstdcxx-time=rt -dnl also searches (and, in case, links) librt. Note that this is +dnl also searches (and, if needed, links) librt. Note that this is dnl not always desirable because, in glibc, for example, in turn it dnl triggers the linking of libpthread too, which activates locking, dnl a large overhead for single-thread programs. @@ -1256,8 +1256,8 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [ ]) dnl -dnl Check for gettimeofday, used in the implementation of 20.8.5 -dnl [time.clock] in the current C++0x working draft. +dnl Check for gettimeofday, used in the implementation of 20.11.7 +dnl [time.clock] in the C++11 standard. dnl AC_DEFUN([GLIBCXX_CHECK_GETTIMEOFDAY], [ diff --git a/libstdc++-v3/include/bits/shared_ptr.h b/libstdc++-v3/include/bits/shared_ptr.h index e1c1eb9..7843365 100644 --- a/libstdc++-v3/include/bits/shared_ptr.h +++ b/libstdc++-v3/include/bits/shared_ptr.h @@ -321,7 +321,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION allocate_shared(const _Alloc& __a, _Args&&... __args); }; - // 20.8.13.2.7 shared_ptr comparisons + // 20.7.2.2.7 shared_ptr comparisons template<typename _Tp1, typename _Tp2> inline bool operator==(const shared_ptr<_Tp1>& __a, @@ -425,13 +425,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct less<shared_ptr<_Tp>> : public _Sp_less<shared_ptr<_Tp>> { }; - // 20.8.13.2.9 shared_ptr specialized algorithms. + // 20.7.2.2.8 shared_ptr specialized algorithms. template<typename _Tp> inline void swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b) noexcept { __a.swap(__b); } - // 20.8.13.2.10 shared_ptr casts. + // 20.7.2.2.9 shared_ptr casts. template<typename _Tp, typename _Tp1> inline shared_ptr<_Tp> static_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept @@ -511,7 +511,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } }; - // 20.8.13.3.7 weak_ptr specialized algorithms. + // 20.7.2.3.6 weak_ptr specialized algorithms. template<typename _Tp> inline void swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b) noexcept diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h index 1ccd5ef..07ac000 100644 --- a/libstdc++-v3/include/bits/shared_ptr_base.h +++ b/libstdc++-v3/include/bits/shared_ptr_base.h @@ -1056,7 +1056,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; - // 20.8.13.2.7 shared_ptr comparisons + // 20.7.2.2.7 shared_ptr comparisons template<typename _Tp1, typename _Tp2, _Lock_policy _Lp> inline bool operator==(const __shared_ptr<_Tp1, _Lp>& __a, @@ -1348,7 +1348,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __weak_count<_Lp> _M_refcount; // Reference counter. }; - // 20.8.13.3.7 weak_ptr specialized algorithms. + // 20.7.2.3.6 weak_ptr specialized algorithms. template<typename _Tp, _Lock_policy _Lp> inline void swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept diff --git a/libstdc++-v3/include/bits/unique_ptr.h b/libstdc++-v3/include/bits/unique_ptr.h index 9b736d4..242d01e 100644 --- a/libstdc++-v3/include/bits/unique_ptr.h +++ b/libstdc++-v3/include/bits/unique_ptr.h @@ -87,7 +87,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Up> void operator()(_Up*) const = delete; }; - /// 20.7.12.2 unique_ptr for single objects. + /// 20.7.1.2 unique_ptr for single objects. template <typename _Tp, typename _Dp = default_delete<_Tp> > class unique_ptr { @@ -260,7 +260,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION unique_ptr& operator=(const unique_ptr&) = delete; }; - /// 20.7.12.3 unique_ptr for array objects with a runtime length + /// 20.7.1.3 unique_ptr for array objects with a runtime length // [unique.ptr.runtime] // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 740 - omit specialization for array objects with a compile time length @@ -406,7 +406,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION unique_ptr& operator=(const unique_ptr&) = delete; // Disable construction from convertible pointer types. - // (N2315 - 20.6.5.3.1) + // (N2315 - 20.7.1.3.1) template<typename _Up> unique_ptr(_Up*, typename std::conditional<std::is_reference<deleter_type>::value, diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono index 9ff8846..33bed03 100644 --- a/libstdc++-v3/include/std/chrono +++ b/libstdc++-v3/include/std/chrono @@ -1,6 +1,6 @@ // <chrono> -*- C++ -*- -// Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +// Copyright (C) 2008-2012 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -53,7 +53,7 @@ namespace std _GLIBCXX_VISIBILITY(default) */ /** @namespace std::chrono - * @brief ISO C++ 0x entities sub namespace for time and date. + * @brief ISO C++ 2011 entities sub-namespace for time and date. */ namespace chrono { @@ -69,7 +69,7 @@ namespace std _GLIBCXX_VISIBILITY(default) } _GLIBCXX_BEGIN_NAMESPACE_VERSION - // 20.8.2.3 specialization of common_type (for duration) + // 20.11.4.3 specialization of common_type (for duration) template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2> struct common_type<chrono::duration<_Rep1, _Period1>, chrono::duration<_Rep2, _Period2>> @@ -85,7 +85,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef chrono::duration<__cr, __r> type; }; - // 20.8.2.3 specialization of common_type (for time_point) + // 20.11.4.3 specialization of common_type (for time_point) template<typename _Clock, typename _Dur1, typename _Dur2> struct common_type<chrono::time_point<_Clock, _Dur1>, chrono::time_point<_Clock, _Dur2>> @@ -227,7 +227,7 @@ _GLIBCXX_END_NAMESPACE_VERSION "period must be a specialization of ratio"); static_assert(_Period::num > 0, "period must be positive"); - // 20.8.3.1 construction / copy / destroy + // 20.11.5.1 construction / copy / destroy constexpr duration() = default; constexpr duration(const duration&) = default; @@ -249,12 +249,12 @@ _GLIBCXX_END_NAMESPACE_VERSION ~duration() = default; duration& operator=(const duration&) = default; - // 20.8.3.2 observer + // 20.11.5.2 observer constexpr rep count() const { return __r; } - // 20.8.3.3 arithmetic + // 20.11.5.3 arithmetic constexpr duration operator+() const { return *this; } @@ -332,7 +332,7 @@ _GLIBCXX_END_NAMESPACE_VERSION return *this; } - // 20.8.3.4 special values + // 20.11.5.4 special values static constexpr duration zero() { return duration(duration_values<rep>::zero()); } diff --git a/libstdc++-v3/include/std/thread b/libstdc++-v3/include/std/thread index f6b19ab..8a45b65 100644 --- a/libstdc++-v3/include/std/thread +++ b/libstdc++-v3/include/std/thread @@ -1,6 +1,6 @@ // <thread> -*- C++ -*- -// Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +// Copyright (C) 2008-2012 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -238,8 +238,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION /** @namespace std::this_thread - * @brief ISO C++ 0x entities sub namespace for thread. - * 30.2.2 Namespace this_thread. + * @brief ISO C++ 2011 entities sub-namespace for thread. + * 30.3.2 Namespace this_thread. */ namespace this_thread {