Looking for std::map::merge when compiling for Clang...
Mark Millard
marklmi26-fbsd at yahoo.com
Sun Apr 1 18:44:12 UTC 2018
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.
===
Mark Millard
marklmi26-fbsd at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
More information about the freebsd-toolchain
mailing list