From owner-freebsd-hackers@freebsd.org Sat Mar 20 15:06:21 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 715095ABF8E; Sat, 20 Mar 2021 15:06:21 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [IPv6:2001:4cb8:90:ffff::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F2kcD2NShz4cb0; Sat, 20 Mar 2021 15:06:20 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from router10g.digiware.nl (localhost.digiware.nl [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id B956437FAA; Sat, 20 Mar 2021 16:06:08 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.com Received: from smtp.digiware.nl ([127.0.0.1]) by router10g.digiware.nl (router10g.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OAPWhvKm33mg; Sat, 20 Mar 2021 16:06:08 +0100 (CET) Received: from [192.168.11.254] (WJW-LAPTOP.digiware.nl [192.168.11.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id 58AF037E6D; Sat, 20 Mar 2021 16:06:08 +0100 (CET) Subject: Re: Looking for std::map::erase_if To: Alan Somers Cc: FreeBSD Hackers , FreeBSD Toolchain References: <941ef2dc-e6e1-bd30-0533-f6789b1463b5@digiware.nl> From: Willem Jan Withagen Message-ID: <499f895c-d614-86bd-2371-a6dd3ac349d7@digiware.nl> Date: Sat, 20 Mar 2021 16:06:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Firefox/68.0 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Rspamd-Queue-Id: 4F2kcD2NShz4cb0 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.82 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:4cb8:90:ffff::3:from]; R_DKIM_ALLOW(-0.20)[digiware.nl:s=medusa-2017]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; SPAMHAUS_ZRD(0.00)[2001:4cb8:90:ffff::3:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[digiware.nl:+]; DMARC_POLICY_ALLOW(-0.50)[digiware.nl,quarantine]; NEURAL_HAM_SHORT(-0.82)[-0.817]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:28878, ipnet:2001:4cb8::/29, country:NL]; MID_RHS_MATCH_FROM(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers,freebsd-toolchain]; DWL_DNSWL_NONE(0.00)[digiware.nl:dkim] Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2021 15:06:21 -0000 On 20-3-2021 15:46, Alan Somers wrote: > It looks like it's in there.  What code are you trying that doesn't work? Hi Alan, I thought so too, but all tries last 2 weeks did not result into anything that got it compiling... But could be that I did not try hard enough, real work is pulling a lot atm. Code is at: https://github.com/dillaman/ceph/blob/138d71fb0635682510cadda8e4ad5aaab3f39e44/src/librbd/api/Trash.cc#L299 Thanx, --WjW > > > grep erase_if  /usr/include/c++/v1/map >   void erase_if(map& c, Predicate pred); >  // C++20 >   void erase_if(multimap& c, Predicate > pred);  // C++20 > void erase_if(map<_Key, _Tp, _Compare, _Allocator>& __c, _Predicate > __pred) > { __libcpp_erase_if_container(__c, __pred); } > void erase_if(multimap<_Key, _Tp, _Compare, _Allocator>& __c, > _Predicate __pred) > { __libcpp_erase_if_container(__c, __pred); } > > On Sat, Mar 20, 2021 at 8:39 AM Willem Jan Withagen via > freebsd-hackers > wrote: > > Hi, > > [ Trying this on FBSD 12.2 ] > > In the Ceph code new code uses std::map::erase_if. > Which is in Linux imported from > > Anybody suggestions on libraries to get something matching?? > > Thanx, > --WjW > _______________________________________________ > freebsd-hackers@freebsd.org > mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org > " >