From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117892 invoked by alias); 8 Aug 2015 10:38:10 -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 117874 invoked by uid 89); 8 Aug 2015 10:38:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 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; Sat, 08 Aug 2015 10:38:08 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id E2D058E710; Sat, 8 Aug 2015 10:38:06 +0000 (UTC) Received: from localhost (ovpn-112-23.ams2.redhat.com [10.36.112.23]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t78Ac5nS024246; Sat, 8 Aug 2015 06:38:06 -0400 Date: Sat, 08 Aug 2015 10:38:00 -0000 From: Jonathan Wakely To: Ville Voutilainen Cc: libstdc++@gcc.gnu.org, "gcc-patches@gcc.gnu.org" Subject: Re: [v3 PATCH] Implement N4279, Improved insertion interface for unique-key maps. Message-ID: <20150808103731.GC9099@redhat.com> References: <20150807083627.GB6443@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20150807083627.GB6443@redhat.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-08/txt/msg00421.txt.bz2 On 07/08/15 09:36 +0100, Jonathan Wakely wrote: >On 21/07/15 00:49 +0300, Ville Voutilainen wrote: >+ template >+ pair > >Indent everything after 'template<...>' please. > >+ try_emplace(const key_type& __k, _Args&&... __args) >+ { >+ iterator __i = lower_bound(__k); >+ if (__i == end() || key_comp()(__k, (*__i).first)) >+ { >+ __i = emplace_hint(__i, std::piecewise_construct, >+ std::forward_as_tuple(__k), >+ std::forward_as_tuple(std::forward<_Args>(__args)...)); >+ return {__i, true}; >+ } >+ return {__i, false}; >+ } > >Add a blank line between functions please. > >+ // move-capable overload >+ template >+ pair >+ try_emplace(key_type&& __k, _Args&&... __args) > > > >+ template > >_M isn't documented as a BADNAME but single character names like that make me >nervous, would _Obj or _Up be OK? > >+ pair >+ insert_or_assign(const key_type& __k, _M&& __obj) >+ { > P.S. I should have said it's OK for trunk with those changes.