From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79443 invoked by alias); 7 Oct 2016 18:04:53 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 78261 invoked by uid 89); 7 Oct 2016 18:04:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=races, implementors, emphasis, Behavior X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Oct 2016 18:04:50 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4F80E31B325; Fri, 7 Oct 2016 18:04:49 +0000 (UTC) Received: from localhost (ovpn-116-122.ams2.redhat.com [10.36.116.122]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u97I4lNq018065; Fri, 7 Oct 2016 14:04:48 -0400 Date: Fri, 07 Oct 2016 18:04:00 -0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] Improve implementation-defined docs for libstdc++ Message-ID: <20161007180447.GA13424@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="/9DWx/yDrRhgMJTb" Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.7.0 (2016-08-17) X-SW-Source: 2016-10/txt/msg00509.txt.bz2 --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-length: 530 We're required to document anything the standard says is implementation-defined. This adds a few missing things to the C++98 and C++11 docs, and adds the new stuff for C++17. I'll regenerate the HTML soon, as I'll be making some more doc changes next week. * doc/xml/manual/status_cxx1998.xml: Improve documentation of implementation-defined properties. * doc/xml/manual/status_cxx2011.xml: Likewise. * doc/xml/manual/status_cxx2017.xml: Likewise. Committed to trunk. I'll backport the relevant parts to the branches too. --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" Content-length: 11280 commit f31956238e6e47f44a333e48fc903c6b6b6f8835 Author: Jonathan Wakely Date: Fri Oct 7 16:17:28 2016 +0100 Improve implementation-defined docs for libstdc++ * doc/xml/manual/status_cxx1998.xml: Improve documentation of implementation-defined properties. * doc/xml/manual/status_cxx2011.xml: Likewise. * doc/xml/manual/status_cxx2017.xml: Likewise. diff --git a/libstdc++-v3/doc/xml/manual/status_cxx1998.xml b/libstdc++-v3/doc/xml/manual/status_cxx1998.xml index 1679ee0..6afb016 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxx1998.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxx1998.xml @@ -1087,19 +1087,14 @@ particular release. [18.6.1]/8 (exception), [18.6.2.1]/5 (bad_exception): The what() member function of class std::exception, and these other - classes publicly derived from it, simply returns the name of the - class. But they are the mangled names; you will need to call - c++filt and pass the names as command-line parameters to - demangle them, or call a - runtime demangler function. - (The classes in <stdexcept> have constructors which - require an argument to use later for what() calls, so the - problem of what()'s value does not arise in most - user-defined exceptions.) + classes publicly derived from it, returns the name of the + class, e.g. "std::bad_alloc". [18.5.1]/7 The return value of - std::type_info::name() is the mangled type name (see the - previous entry for more). + std::type_info::name() is the mangled type name. + You will need to call c++filt and pass the names as + command-line parameters to demangle them, or call a + runtime demangler function. [20.1.5]/5 "Implementors are encouraged to supply libraries that can accept allocators that encapsulate more @@ -1114,6 +1109,7 @@ particular release. [21.1.3.1]/3,4, [21.1.3.2]/2, + [21.3]/6 basic_string::iterator, basic_string::const_iterator, [23.*]'s foo::iterator, [27.*]'s foo::*_type, others... diff --git a/libstdc++-v3/doc/xml/manual/status_cxx2011.xml b/libstdc++-v3/doc/xml/manual/status_cxx2011.xml index e1b372d..83a266f 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxx2011.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxx2011.xml @@ -2572,9 +2572,41 @@ particular release. + 17.6.5.12 [res.on.exception.handling] + There are no implementation-defined exception classes, only standard + exception classes (or classes derived from them) will be thrown. + + + + 17.6.5.14 [value.error.codes] + The error_category for errors originating outside + the OS, and the possible error code values for each error category, + should be documented here. + + + + 18.6.2.2 [new.badlength] + what() returns + "std::bad_array_new_length". + + + + 20.6.9.1 [allocator.member]/5 + Over-aligned types are not supported by + std::allocator. + + + 20.7.2.2.1 [util.smartptr.shared.const] - Only bad_alloc (or types derived from it) will - be thrown. + When a shared_ptr constructor fails + bad_alloc (or types derived from it) will + be thrown, or when an allocator is passed to the constructor then any + exceptions thrown by the allocator. + + + + 20.7.2.0 [util.smartptr.weakptr] + what() returns "bad_weak_ptr". @@ -2584,6 +2616,18 @@ particular release. + 20.11.7.1 [time.clock.system]/3, /4 + Time point values are truncated to time_t values. + There is no loss of precision for conversions in the other direction. + + + + 20.15.7 [meta.trans]/2 + aligned_storage does not support extended + alignment. + + + 21.2.3.2 [char.traits.specializations.char16_t], 21.2.3.3 [char.traits.specializations.char32_t] The types u16streampos and @@ -2593,6 +2637,11 @@ particular release. + 22.3.1 [locale] + There is one global locale for the whole program, not per-thread. + + + 22.4.5.1.2 [locale.time.get.virtuals], 22.4.5.3.2 [locale.time.put.virtuals] Additional supported formats should be documented here. @@ -2604,6 +2653,13 @@ particular release. + 23.3.2.1 [array.overview] + array<T, N>::iterator is T* and + array<T, N>::const_iterator is + const T*. + + + 23.5.4.2 [unord.map.cnstr], 23.5.5.2 [unord.multimap.cnstr], 23.5.6.2 [unord.set.cnstr], @@ -2652,6 +2708,20 @@ particular release. + 27.8.2.1 [stringbuf.cons] + Whether the sequence pointers are copied by the + basic_stringbuf move constructor should be + documented here. + + + + 27.9.1.2 [filebuf.cons] + Whether the sequence pointers are copied by the + basic_filebuf move constructor should be + documented here. + + + 28.5.1 [re.synopt], 28.5.2 [re.matchflag] , 28.5.3 [re.err] @@ -2666,6 +2736,12 @@ particular release. + 29.4 [atomics.lockfree] + The values of the ATOMIC_xxx_LOCK_FREE macros depend on + the target and cannot be listed here. + + + 30.2.3 [thread.req.native]/1 native_handle_type and native_handle are provided. The handle types diff --git a/libstdc++-v3/doc/xml/manual/status_cxx2017.xml b/libstdc++-v3/doc/xml/manual/status_cxx2017.xml index f1d709e..c03978e 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxx2017.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxx2017.xml @@ -876,4 +876,112 @@ Feature-testing recommendations for C++. +
Implementation Specific Behavior + + For behaviour which is also specified by previous standards, + see C++ 1998/2003 Implementation + Specific Behavior and C++ + 2011 Implementation Specific Behavior. This section only + documents behaviour which is new in the 2017 standard. + + + + 20.6.5 [optional.bad_optional_access] + what() returns "bad optional access". + + + + 20.7.2 [variant.variant] + Whether variant supports over-aligned types + should be documented here. + + + + 20.7.10 [variant.bad.access] + what() returns "Unexpected index". + + + + 20.12.5.2 [memory.resource.pool.options] + The limits for maximum number of blocks and largest allocation size + supported by pool_options should be documented + here. + + + + 20.12.6.1 [memory.resource.monotonic.buffer.ctor] + The default next_buffer_size and growth factor should + be documented here. + + + + 20.15.4.3 [meta.unary.prop] + The predicate condition for + has_unique_object_representations is true for all scalar + types except floating point types. + + + + 20.19.3 [execpol.type], + 25.2.3 [algorithms.parallel.exec] + There are no implementation-defined execution policies. + + + + 22.4.2 [string.view.template] + basic_string_view<C, T>::iterator is + C* and + basic_string_view<C, T>::const_iterator is + const C*. + + + + + 25.2.3 [algorithms.parallel.exec] + Threads of execution created by std::thread + provide concurrent forward progress guarantees, so threads of execution + implicitly created by the library will provide parallel forward + progress guarantees. + + + + 26.4.1 [cfenv.syn] + The effects of the <cfenv> functions + depends on whether the FENV_ACCESS pragma is supported, + and on the C library that provides the header. + + + + 26.6.9 [c.math.rand] + Whether the rand function may introduce data + races depends on the target C library that provides the function. + + + + 26.9.5 [sf.cmath] + The effect of calling the mathematical special functions with large + inputs should be documented here. + + + + 27.10.2.1 [fs.conform.9945] + The behavior of the filesystem library implementation will depend on + the target operating system. Some features will not be not supported + on some targets. + + + + 27.10.6 [fs.filesystem.syn] + The clock used for file times is + std::chrono::system_clock. + + + + 27.10.8 [path.generic] + dot-dot in the root-directory refers to the root-directory itself. + + + +
+ --/9DWx/yDrRhgMJTb--