Date: Sun, 1 Apr 2018 21:35:02 +0200 From: Willem Jan Withagen <wjw@digiware.nl> To: Mark Millard <marklmi26-fbsd@yahoo.com>, freebsd-toolchain@freebsd.org Subject: Re: Looking for std::map::merge when compiling for Clang... Message-ID: <9b2ab40b-7100-7c5b-34c2-0818cb85b692@digiware.nl> In-Reply-To: <E77AA8D3-FE3C-4E27-AC33-9F5D4044A034@yahoo.com> References: <E77AA8D3-FE3C-4E27-AC33-9F5D4044A034@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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<std::__1::basic_string<char>, ceph::buffer::list, >> std::__1::less<std::__1::basic_string<char> >, >> std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>, >> 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 <map> > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9b2ab40b-7100-7c5b-34c2-0818cb85b692>