From patchwork Wed Aug 3 18:10:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 655550 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3s4LjM5PKVz9t0t for ; Thu, 4 Aug 2016 04:11:02 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=IJml4wPh; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=qzK2Xy0IUkX8AKtYwawltimf8EiJH63OnanzmE6j1H+S327Oe8BVB dpDOlfkjsovY+yTdcLcnHjL027po0zZk92a6IOnInpxRuEjOvf9H8UN1Hz6UhbDH 2kv5dCX3GptVKf8v3xbgxcQ4KTcRSMTVUEp+5iy2g9WZi7efSvWlaE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=+BbYlW2Sytuy8yZNmdCEc7faEnE=; b=IJml4wPhCy+mABzcPDo6 9cZwcoQSbEbXavfQKuryn2nGe02QOkSVtOPu8K5i+hT9tStiPm8yWVBsIHR+jJz0 qa5K9L4gP3MH6nXbDeq8G40pCdRD///EKJwPHCT1dhWfGrI6KEEbBObT+gFd2y7q bVvNMwZ1wvz8myf07hBZh4w= Received: (qmail 30445 invoked by alias); 3 Aug 2016 18:10:45 -0000 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 Received: (qmail 30417 invoked by uid 89); 3 Aug 2016 18:10:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 03 Aug 2016 18:10:43 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (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 DE029636E7; Wed, 3 Aug 2016 18:10:41 +0000 (UTC) Received: from localhost (ovpn-116-93.ams2.redhat.com [10.36.116.93]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u73IAeli007232; Wed, 3 Aug 2016 14:10:41 -0400 Date: Wed, 3 Aug 2016 19:10:40 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] Define C++17 feature-test macros Message-ID: <20160803181040.GA28113@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.6.2 (2016-07-01) This just defines feature-test macros for some C++17 features that we already support. * include/bits/allocator.h (__cpp_lib_incomplete_container_elements): Define feature-test macro. * include/bits/range_access.h (__cpp_lib_array_constexpr): Likewise. * include/std/shared_mutex (__cpp_lib_shared_mutex): Uncomment. * include/std/type_traits (__cpp_lib_logical_traits): Fix value. (__cpp_lib_type_trait_variable_templates): Define. Tested powerpc64-linux, committed to trunk. commit b607d0af6b72cbcef36d2aa107e98285fe133245 Author: Jonathan Wakely Date: Wed Aug 3 18:06:50 2016 +0100 Define C++17 feature-test macros * include/bits/allocator.h (__cpp_lib_incomplete_container_elements): Define feature-test macro. * include/bits/range_access.h (__cpp_lib_array_constexpr): Likewise. * include/std/shared_mutex (__cpp_lib_shared_mutex): Uncomment. * include/std/type_traits (__cpp_lib_logical_traits): Fix value. (__cpp_lib_type_trait_variable_templates): Define. diff --git a/libstdc++-v3/include/bits/allocator.h b/libstdc++-v3/include/bits/allocator.h index 597d305..984d800 100644 --- a/libstdc++-v3/include/bits/allocator.h +++ b/libstdc++-v3/include/bits/allocator.h @@ -49,6 +49,8 @@ #include #endif +#define __cpp_lib_incomplete_container_elements 201505 + namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION diff --git a/libstdc++-v3/include/bits/range_access.h b/libstdc++-v3/include/bits/range_access.h index e2ec072..d6f8fa1 100644 --- a/libstdc++-v3/include/bits/range_access.h +++ b/libstdc++-v3/include/bits/range_access.h @@ -38,6 +38,10 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION +#if __cplusplus >= 201402L +# define __cpp_lib_array_constexpr 201603L +#endif + /** * @brief Return an iterator pointing to the first element of * the container. diff --git a/libstdc++-v3/include/std/shared_mutex b/libstdc++-v3/include/std/shared_mutex index 6ca322b..9712b35 100644 --- a/libstdc++-v3/include/std/shared_mutex +++ b/libstdc++-v3/include/std/shared_mutex @@ -52,7 +52,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #ifdef _GLIBCXX_HAS_GTHREADS #if __cplusplus > 201402L -// TODO: #define __cpp_lib_shared_mutex 201505 +#define __cpp_lib_shared_mutex 201505 class shared_mutex; #endif diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index dd9f57e..693952a 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -156,7 +156,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus > 201402L -#define __cpp_lib_logical_traits 201511 +#define __cpp_lib_logical_traits 201510 template struct conjunction @@ -2763,6 +2763,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif // __cplusplus >= 201402L #if __cplusplus > 201402L +# define __cpp_lib_type_trait_variable_templates 201510L template constexpr bool is_void_v = is_void<_Tp>::value; template