Looking for std::map::merge when compiling for Clang...
Willem Jan Withagen
wjw at digiware.nl
Sun Apr 1 19:35:08 UTC 2018
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
More information about the freebsd-toolchain
mailing list