From patchwork Tue Dec 11 22:31:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 205325 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 C4E392C0097 for ; Wed, 12 Dec 2012 09:31:56 +1100 (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=1355869917; 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=rgwDf5J ezesK6fFgRYlaIXRrM20=; b=SMIh+qS2soK7yLvplGcM7I97q9Lx3Mzq+GerydT zblY5jt9i9lDMl37PmEDSDu0PQGTqOVawCVW8RDZdBU2G96uN2rmBa0mX95qqSCV PK8zZX8WrTj1vHGNPx+4voGWppRqVVABTUftD9f6uCKdQ8aywgIcKlXDP6lNIog+ hKeU= 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=KEdRDvsf45HUzaXf/oujWX2kVi5pC5dWoSUcDu6IIjmRj2UlquGW/SNP2LYaUl PpuMrf5M/n8vRu6F4HsagXa6S3JxVcZVCL2j3VYzIAd07YY2P9KCKZ6KJTT5MQIq NMvF4sGpqxgWrPF9vOA8+Y4/BEvSHVb6EDL8M8GSzryAM=; Received: (qmail 2487 invoked by alias); 11 Dec 2012 22:31:45 -0000 Received: (qmail 2467 invoked by uid 22791); 11 Dec 2012 22:31:44 -0000 X-SWARE-Spam-Status: No, hits=-4.5 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 X-Spam-Check-By: sourceware.org Received: from mail-ia0-f171.google.com (HELO mail-ia0-f171.google.com) (209.85.210.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Dec 2012 22:31:39 +0000 Received: by mail-ia0-f171.google.com with SMTP id k27so9700126iad.30 for ; Tue, 11 Dec 2012 14:31:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.159.165 with SMTP id xd5mr11344891igb.58.1355265099221; Tue, 11 Dec 2012 14:31:39 -0800 (PST) Received: by 10.43.5.199 with HTTP; Tue, 11 Dec 2012 14:31:38 -0800 (PST) Date: Tue, 11 Dec 2012 22:31:38 +0000 Message-ID: Subject: [patch] fix libstdc++/55631 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 PR libstdc++/55631 * include/ext/alloc_traits.h: Include missing header. * include/ext/pointer.h: Likewise. * include/ext/string_conversions.h: Require C++11. * libsupc++/initializer_list: Reindent. Tested x86_64-linux, committed to trunk. commit 4e4d3c624f02150044702ff9bff695c2c168308f Author: Jonathan Wakely Date: Tue Dec 11 19:29:27 2012 +0000 PR libstdc++/55631 * include/ext/alloc_traits.h: Include missing header. * include/ext/pointer.h: Likewise. * include/ext/string_conversions.h: Require C++11. * libsupc++/initializer_list: Reindent. diff --git a/libstdc++-v3/include/ext/alloc_traits.h b/libstdc++-v3/include/ext/alloc_traits.h index a0834c3..b46b0fc 100644 --- a/libstdc++-v3/include/ext/alloc_traits.h +++ b/libstdc++-v3/include/ext/alloc_traits.h @@ -32,6 +32,7 @@ #pragma GCC system_header #if __cplusplus >= 201103L +# include # include #else # include // for __alloc_swap diff --git a/libstdc++-v3/include/ext/pointer.h b/libstdc++-v3/include/ext/pointer.h index 5592a77..b3c8687 100644 --- a/libstdc++-v3/include/ext/pointer.h +++ b/libstdc++-v3/include/ext/pointer.h @@ -43,6 +43,7 @@ #include #include #if __cplusplus >= 201103L +# include # include #endif diff --git a/libstdc++-v3/include/ext/string_conversions.h b/libstdc++-v3/include/ext/string_conversions.h index f85ab99..7df905f 100644 --- a/libstdc++-v3/include/ext/string_conversions.h +++ b/libstdc++-v3/include/ext/string_conversions.h @@ -31,6 +31,10 @@ #pragma GCC system_header +#if __cplusplus < 201103L +# include +#else + #include #include #include @@ -98,4 +102,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } // namespace +#endif // C++11 + #endif // _STRING_CONVERSIONS_H diff --git a/libstdc++-v3/libsupc++/initializer_list b/libstdc++-v3/libsupc++/initializer_list index 5e2a78b..89add48 100644 --- a/libstdc++-v3/libsupc++/initializer_list +++ b/libstdc++-v3/libsupc++/initializer_list @@ -77,7 +77,7 @@ namespace std // One past the last element. constexpr const_iterator end() const noexcept { return begin() + size(); } - }; + }; /** * @brief Return an iterator pointing to the first element of