From patchwork Thu Aug 9 22:45:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 176295 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 5300E2C0085 for ; Fri, 10 Aug 2012 08:45:52 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1345157152; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=6URWD73 5MvEC4ktfj5PSMN+BajE=; b=xVRt8Hki5TnFtrqA2fusn9MxeVpAXntn9c+HH/z 6/IxUzKv9lrMWkTW8TZxjcMTj+8yMe8lUxGR3OWKk3dKjdd0WIdTdTRoTLIddLgH Io2uiusIoFB55DuOYO05GzL3P0vtLgHX4dnW9hoZw2KQtao7Lk1QyUpUry/xAlX8 X0rc= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=xp9Ow0j0bgcrTT5kXhk3aVRvMRtKkPg5dMEGVu5rnw7vjqF8VX9YTDgcpkq8/u uhzlw5hA/OTBtITTh4E9XOvUqOvwNIC68QCb966SMhsFCtyc0t5r9w2DBMJ6hefh J7Zfmj4dpJtTK9JbLXH9iaFlPRyGdBMt47wvJkJMsmPt0=; Received: (qmail 18670 invoked by alias); 9 Aug 2012 22:45:46 -0000 Received: (qmail 18650 invoked by uid 22791); 9 Aug 2012 22:45:43 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_CX, TW_DC X-Spam-Check-By: sourceware.org Received: from mail-yx0-f175.google.com (HELO mail-yx0-f175.google.com) (209.85.213.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Aug 2012 22:45:29 +0000 Received: by yenm1 with SMTP id m1so1060928yen.20 for ; Thu, 09 Aug 2012 15:45:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.207.106 with SMTP id lv10mr138853igc.0.1344552328236; Thu, 09 Aug 2012 15:45:28 -0700 (PDT) Received: by 10.42.12.17 with HTTP; Thu, 9 Aug 2012 15:45:28 -0700 (PDT) Date: Thu, 9 Aug 2012 23:45:28 +0100 Message-ID: Subject: [v3] fix references to C++11 standard From: Jonathan Wakely To: "libstdc++" , gcc-patches Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 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 inline bool operator==(const shared_ptr<_Tp1>& __a, @@ -425,13 +425,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct less> : public _Sp_less> { }; - // 20.8.13.2.9 shared_ptr specialized algorithms. + // 20.7.2.2.8 shared_ptr specialized algorithms. template 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 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 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 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 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 void operator()(_Up*) const = delete; }; - /// 20.7.12.2 unique_ptr for single objects. + /// 20.7.1.2 unique_ptr for single objects. template > 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 unique_ptr(_Up*, typename std::conditional::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 @@ // -*- 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 struct common_type, 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 struct common_type, 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::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 @@ // -*- 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 {