From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107916 invoked by alias); 1 Feb 2018 21:48:48 -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 107895 invoked by uid 89); 1 Feb 2018 21:48:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=2317 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wm0-f47.google.com Received: from mail-wm0-f47.google.com (HELO mail-wm0-f47.google.com) (74.125.82.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Feb 2018 21:48:46 +0000 Received: by mail-wm0-f47.google.com with SMTP id r71so8845799wmd.1; Thu, 01 Feb 2018 13:48:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=b5432Od9dj6dzFRtL/tyu+PZtJzk1qYOhIO3DkdZgkA=; b=RQmwng/vO/gB3LJp0b0wgKysjS4KdxgDTEXILnEfhb3QefYNFnbBy7LFK1S/nXy50A KhpQt4cxN6NopCqGVQJmt2w5t/Sv+cZnh45q8NIXro+eIiIx/mL2V8GyG2gNz2O6/RsA jWD12z23MGxqd3SyuY6fVnMe5K2qkx1yhtUha/UvZdY5qLCgwEO6YGXKuc+F1zSbwIYH 5555oas6Ftxws9zDWmMS//b3Vpq+4s3QABlyiI+D2UtPSXo/rWa5xUq3VI2R1/lDHY6D W8DH7soAC3F5XUDhYkN3tpxukCrrLFXMx1Lu/RT2sO1F7LtmncsMY+BeWk2VP95R+HHH 9yZw== X-Gm-Message-State: AKwxytf9Ap2YLlZihiPvtlIhbDQ90jl7HzGRLxQXuZ4EkWyMU09PgRuz ma1GLAikqwr9oI8+3ZOvCW29bw== X-Google-Smtp-Source: AH8x225kTh7lRuVHD5FgskZ5OQUOOCXD1H0FkCzzCiJmJqMPxyFqn4YN1OPSHK2IJfB1zFsizLqigw== X-Received: by 10.80.176.163 with SMTP id j32mr52261613edd.270.1517521723851; Thu, 01 Feb 2018 13:48:43 -0800 (PST) Received: from [192.168.0.37] (arf62-1-82-237-250-248.fbx.proxad.net. [82.237.250.248]) by smtp.googlemail.com with ESMTPSA id y5sm518932ede.71.2018.02.01.13.48.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Feb 2018 13:48:42 -0800 (PST) To: "libstdc++@gcc.gnu.org" , gcc-patches From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= Subject: Extend aligned_membuf<> usage Message-ID: Date: Thu, 01 Feb 2018 21:48:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------6C2F62B7AFC625CC67474B95" X-SW-Source: 2018-02/txt/msg00075.txt.bz2 This is a multi-part message in MIME format. --------------6C2F62B7AFC625CC67474B95 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-length: 135 Hi     As we just bump version namespace it might be interesting to do the following change now. What do you think ? François --------------6C2F62B7AFC625CC67474B95 Content-Type: text/x-patch; name="aligned_membuf.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="aligned_membuf.patch" Content-length: 1881 diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h index 56b3ac5..05abd43 100644 --- a/libstdc++-v3/include/bits/forward_list.h +++ b/libstdc++-v3/include/bits/forward_list.h @@ -116,7 +116,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { _Fwd_list_node() = default; +#if _GLIBCXX_INLINE_VERSION + __gnu_cxx::__aligned_membuf<_Tp> _M_storage; +#else __gnu_cxx::__aligned_buffer<_Tp> _M_storage; +#endif _Tp* _M_valptr() noexcept diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h index 3ff6b14..222a1b2 100644 --- a/libstdc++-v3/include/bits/hashtable_policy.h +++ b/libstdc++-v3/include/bits/hashtable_policy.h @@ -231,7 +231,11 @@ namespace __detail { typedef _Value value_type; +#if _GLIBCXX_INLINE_VERSION + __gnu_cxx::__aligned_membuf<_Value> _M_storage; +#else __gnu_cxx::__aligned_buffer<_Value> _M_storage; +#endif _Value* _M_valptr() noexcept @@ -1516,7 +1520,11 @@ namespace __detail template::value> struct _Hash_code_storage { +#if _GLIBCXX_INLINE_VERSION + __gnu_cxx::__aligned_membuf<_Tp> _M_storage; +#else __gnu_cxx::__aligned_buffer<_Tp> _M_storage; +#endif _Tp* _M_h() { return _M_storage._M_ptr(); } diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h index b58273a..8e00f1b 100644 --- a/libstdc++-v3/include/bits/shared_ptr_base.h +++ b/libstdc++-v3/include/bits/shared_ptr_base.h @@ -534,7 +534,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Alloc& _M_alloc() noexcept { return _A_base::_S_get(*this); } +#if _GLIBCXX_INLINE_VERSION + __gnu_cxx::__aligned_membuf<_Tp> _M_storage; +#else __gnu_cxx::__aligned_buffer<_Tp> _M_storage; +#endif }; public: --------------6C2F62B7AFC625CC67474B95--