From 3263b90e1f6cc0816495ed6bfb9f324852307dd1 Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Sun, 1 Apr 2018 14:34:48 +0200 Subject: [PATCH] mds: Clang does not (yet) support std::map::merge @tchaikov found: libc++ still does not support "Splicing Maps and Sets", see https://libcxx.llvm.org/cxx1z_status.html , search for "p0083r3" . Make this case the more explicit coded. Signed-off-by: Willem Jan Withagen --- src/mds/OpenFileTable.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mds/OpenFileTable.cc b/src/mds/OpenFileTable.cc index 4bb52ba0054c..cc64d42c523f 100644 --- a/src/mds/OpenFileTable.cc +++ b/src/mds/OpenFileTable.cc @@ -12,6 +12,7 @@ * */ +#include "acconfig.h" #include "mds/CInode.h" #include "mds/CDir.h" #include "mds/MDSRank.h" @@ -342,8 +343,13 @@ void OpenFileTable::commit(MDSInternalContextBase *c, uint64_t log_seq, int op_p mds->objecter->mutate(oid, oloc, op, snapc, ceph::real_clock::now(), 0, gather.new_sub()); +#ifdef HAVE_STDLIB_MAP_SPLICING ctl.journaled_update.merge(ctl.to_update); ctl.journaled_remove.merge(ctl.to_remove); +#else + ctl.journaled_update.insert(ctl.to_update.begin(), ctl.to_update.end()); + ctl.journaled_remove.insert(ctl.to_remove.begin(), ctl.to_remove.end()); +#endif ctl.to_update.clear(); ctl.to_remove.clear(); }; -- 2.47.3