From owner-freebsd-toolchain@freebsd.org Sun Apr 1 19:35:08 2018 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D1E4F76BA7 for ; Sun, 1 Apr 2018 19:35:08 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [IPv6:2001:4cb8:90:ffff::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F16717A364 for ; Sun, 1 Apr 2018 19:35:07 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from router.digiware.nl (localhost.digiware.nl [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 9E2AF2EE13; Sun, 1 Apr 2018 21:35:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at digiware.com Received: from smtp.digiware.nl ([127.0.0.1]) by router.digiware.nl (router.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZF3QGJmXNc72; Sun, 1 Apr 2018 21:35:04 +0200 (CEST) Received: from [192.168.11.152] (unknown [192.168.11.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id 0B77A2EDF5; Sun, 1 Apr 2018 21:35:04 +0200 (CEST) Subject: Re: Looking for std::map::merge when compiling for Clang... To: Mark Millard , freebsd-toolchain@freebsd.org References: From: Willem Jan Withagen Message-ID: <9b2ab40b-7100-7c5b-34c2-0818cb85b692@digiware.nl> Date: Sun, 1 Apr 2018 21:35:02 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Apr 2018 19:35:08 -0000 On 01/04/2018 20:44, Mark Millard wrote: > Willem Jan Withagen wjw at digiware.nl wrote on > Sun Apr 1 12:19:35 UTC 2018 : > >> I'm trying to compile a src file with Ceph that has been upgrade to use >> more of the C++17 features, but it fails on a missing function: >> >> /home/jenkins/workspace/ceph-master/src/mds/OpenFileTable.cc:349:26: >> error: no member named 'merge' in >> 'std::__1::map, ceph::buffer::list, >> std::__1::less >, >> std::__1::allocator, >> ceph::buffer::list> > >' >> ctl.journaled_update.merge(ctl.to_update); >> ~~~~~~~~~~~~~~~~~~~~ ^ > > If you can get ahold of the text for the compile command, it would > be a good idea to send that out as additional information. > > A point about clang as a standard in FreeBSD, with the system and > ports there are many alternatives. (Although having some level of > C++17 support does cut down the size of the list.) > > In a C++17 context: > > #include > > should have defined merge for std::map. The error message suggests > complete lack of a definition, rather than an unsupported type of > argument (overload mismatch) or other such. > > Such might be because the compile did not indicate to use C++17 > --or some other point that is outside OpenFileTable.cc . See the > command that generated the error would likely help with > identifying the proper context for fixing the issue. One of the ceph codevelopers found the cause: libc++ still does not support "Splicing Maps and Sets", see https://libcxx.llvm.org/cxx1z_status.html , search for "p0083r3" . So the solution has to come from upstream. --WjW