From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94075 invoked by alias); 24 Nov 2017 17:03:50 -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 94045 invoked by uid 89); 24 Nov 2017 17:03:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KB_WAM_FROM_NAME_SINGLEWORD,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=guides 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, 24 Nov 2017 17:03:48 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6118C5F739; Fri, 24 Nov 2017 17:03:47 +0000 (UTC) Received: from [10.36.117.20] (ovpn-117-20.ams2.redhat.com [10.36.117.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BD4C517B16; Fri, 24 Nov 2017 17:03:46 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org From: Stephan Bergmann Subject: [PATCH] Fix typo in unordered_map deduction guide, missing "typename =" Message-ID: Date: Fri, 24 Nov 2017 17:21:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------7B9FDF6F5828E22EF27034A1" X-SW-Source: 2017-11/txt/msg02217.txt.bz2 This is a multi-part message in MIME format. --------------7B9FDF6F5828E22EF27034A1 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 789 Otherwise, at least recent Clang trunk with -std=gnu++17 complains > In file included from lib/gcc/x86_64-pc-linux-gnu/8.0.0/../../../../include/c++/8.0.0/functional:60: > In file included from lib/gcc/x86_64-pc-linux-gnu/8.0.0/../../../../include/c++/8.0.0/unordered_map:47: > lib/gcc/x86_64-pc-linux-gnu/8.0.0/../../../../include/c++/8.0.0/bits/unordered_map.h:1197:5: error: deduction guide template contains a template parameter that cannot be deduced > unordered_map(initializer_list>, _Allocator) > ^ > lib/gcc/x86_64-pc-linux-gnu/8.0.0/../../../../include/c++/8.0.0/bits/unordered_map.h:1196:34: note: non-deducible template parameter (anonymous) > _RequireAllocator<_Allocator>> > ^ > 1 error generated. --------------7B9FDF6F5828E22EF27034A1 Content-Type: text/x-patch; name="0001-Fix-typo-in-unordered_map-deduction-guide-missing-ty.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Fix-typo-in-unordered_map-deduction-guide-missing-ty.pa"; filename*1="tch" Content-length: 1762 >From 0ecb03c59b9318b3f47e49daa2f45dd513035d55 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 24 Nov 2017 17:55:38 +0100 Subject: [PATCH] Fix typo in unordered_map deduction guide, missing "typename =" ...as correctly appears in all the other deduction guides in these files. --- libstdc++-v3/include/bits/unordered_map.h | 2 +- libstdc++-v3/include/debug/unordered_map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/include/bits/unordered_map.h b/libstdc++-v3/include/bits/unordered_map.h index cb5bcb89a16..27c89f172e1 100644 --- a/libstdc++-v3/include/bits/unordered_map.h +++ b/libstdc++-v3/include/bits/unordered_map.h @@ -1193,7 +1193,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; template> + typename = _RequireAllocator<_Allocator>> unordered_map(initializer_list>, _Allocator) -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map index c5734304846..c68ccaa3372 100644 --- a/libstdc++-v3/include/debug/unordered_map +++ b/libstdc++-v3/include/debug/unordered_map @@ -679,7 +679,7 @@ namespace __debug -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; template> + typename = _RequireAllocator<_Allocator>> unordered_map(initializer_list>, _Allocator) -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; -- 2.13.6 --------------7B9FDF6F5828E22EF27034A1--