From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id C93113858D1E; Mon, 27 Feb 2023 05:46:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C93113858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x52d.google.com with SMTP id o12so20903536edb.9; Sun, 26 Feb 2023 21:46:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=VbBtfmxbtjaJxHQV8lM2lv3ogwakSrhns8geRgtMTmc=; b=G/Lw+hWS3Whw3Cwc8UyFacnZuuToUzOWHn5b5dVqOvM71MiG00JuCfV6Y9yAvvjHWD RaYpqFXydkXUM7HVgr8xFf/upRY66A9uQP293oEv12oXpq9/BJdwumWQfB/CjRO71HR8 cmd4BynQS4C0oY0X/GVx03Jf+VONgLzhBqOnEvhCG6Taxkkks8IWdhA3VdE0sD/KJoZ0 F0g9L2+uh7OPGes/byfhtnmdtbL7In33QBCxQiLQ5iqPal2RNlz3m1MYgTzMMsvyW0rv Rf/dlIReBweKkjHMhEeiZh4kV2SUCZ4wYB2lamGp2tKgcWVGXmQEA68tV7KnrvvE+I37 iUpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VbBtfmxbtjaJxHQV8lM2lv3ogwakSrhns8geRgtMTmc=; b=4VHYGPCJFN/dQwky7LsygcZAMXs2oP4EP1Og0RoEpWYpzD6nNtHJh6JiuJW0IHSGUh Uxfzx2/voL/cUBRKzazJCQwtmReNVlFXgNm3u//fM+GeEqmpnttYu/ftMF+tlWxAv275 x90+sT+n3lUbPkqqXONXgVQZ/W0ad7LlT1+k+D3PlYvS/sEmO8fQEvWaRSKOGMakiHFW /JmMHxsnl5e+qimAh+d9488N8if3Tor+NQ+Kf8G4l6J50a2cvZhLKMdrZbxqr1gyp78+ +7o35oHMt4ybNqLjp5MakqBODTAk1tym+NtpN9bXIkQwamuU2FRh2JtJnxQAr2nXvGsL w/fg== X-Gm-Message-State: AO0yUKVdFjM24oq29JU9qYWNsRuHqZhU4X5ie+96rLx7vBUOV5fqMm+0 gzCnc2UpaENJpN6mtz2k9kJVO8YF8js= X-Google-Smtp-Source: AK7set8LJhw2IzxtEN+Y465rRwK/w5aYmvm9YlPenv0e7CiD5AnipGzHNKwriEvVG/aRJBGjKBkUJA== X-Received: by 2002:a17:907:8c89:b0:8b1:779c:a8ac with SMTP id td9-20020a1709078c8900b008b1779ca8acmr38031074ejc.13.1677476794571; Sun, 26 Feb 2023 21:46:34 -0800 (PST) Received: from [10.25.0.52] ([109.190.253.11]) by smtp.googlemail.com with ESMTPSA id vs3-20020a170907138300b008c06de45e75sm2772308ejb.107.2023.02.26.21.46.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Feb 2023 21:46:33 -0800 (PST) Message-ID: <215381ed-9370-3d51-c262-dcc448d306f2@gmail.com> Date: Mon, 27 Feb 2023 06:46:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH] Fix std::unordered_map key range insertion From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= To: "libstdc++@gcc.gnu.org" Cc: gcc-patches References: <860b46c8-fc2a-3024-5fd2-5130ca8c27c8@gmail.com> Content-Language: fr In-Reply-To: <860b46c8-fc2a-3024-5fd2-5130ca8c27c8@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Replying to my own questions. This use case is not valid from a Standard point of view. So not a bug and no need to deal with that before next stage 1. The question left is either we want to support it ? François On 23/02/23 22:14, François Dumont wrote: > Hi > > Based on my work on PR 96088 for std::map I imagine this use case of > inserting a range of keys into an associative container. It behaves as > operator[] by inserting a default value for each key. > > I wonder if the Standard says that it should work. Or maybe we want to > support it ? > > I haven't checked if it used to work before we introduced the > _ConvertToValueType type. I have no old enough gcc to do so. > > It is not supported by std::map neither, even without > _ConvertToValueType so I guess it was not working for > std::unordered_map prior to it. > > If it can be considered as a bug I'll create a PR. > > François >