]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/histogram/test/utility_allocator.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / histogram / test / utility_allocator.hpp
index 60745d0e09504be6e0e816af659daa13a37a14c3..f52ef848f815ffffa12ade034931715c2057b4f3 100644 (file)
@@ -5,11 +5,11 @@
 // or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #include <algorithm>
-#include <boost/config.hpp>
 #include <boost/core/lightweight_test.hpp>
 #include <boost/core/typeinfo.hpp>
 #include <boost/histogram/detail/type_name.hpp>
 #include <boost/throw_exception.hpp>
+#include <initializer_list>
 #include <iostream>
 #include <unordered_map>
 #include <utility>
@@ -32,7 +32,8 @@ struct tracing_allocator_db : std::pair<int, int> {
   template <class... Ts>
   void log(Ts&&... ts) {
     if (!tracing) return;
-    log_impl(std::forward<Ts>(ts)...);
+    // fold trick
+    (void)std::initializer_list<int>{(std::cerr << ts, 0)...};
     std::cerr << std::endl;
   }
 
@@ -41,14 +42,6 @@ struct tracing_allocator_db : std::pair<int, int> {
 private:
   using map_t = std::unordered_map<const boost::core::typeinfo*, std::pair<int, int>>;
   map_t map_;
-
-  BOOST_ATTRIBUTE_UNUSED inline void log_impl() {}
-
-  template <class T, class... Ts>
-  void log_impl(T&& t, Ts&&... ts) {
-    std::cerr << t;
-    log_impl(std::forward<Ts>(ts)...);
-  }
 };
 
 template <class T>