]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson: fix FTBFS on Clang induced by errorator.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 1 Jan 2020 21:18:47 +0000 (22:18 +0100)
committerRonen Friedman <rfriedma@redhat.com>
Sun, 5 Jan 2020 16:00:37 +0000 (18:00 +0200)
Reported-by Ronen Friedman <rfriedma@redhat.com>
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/common/errorator.h

index 137f55d0a16279d4e9ab3bfc56e5338564f48c27..1501999e74ed83edb3e32e20081bde30140a9b2d 100644 (file)
@@ -79,7 +79,7 @@ public:
 template <class ErrorT, ErrorT ErrorV>
 struct unthrowable_wrapper : error_t<unthrowable_wrapper<ErrorT, ErrorV>> {
   unthrowable_wrapper(const unthrowable_wrapper&) = delete;
-  static constexpr unthrowable_wrapper instance{};
+  static const unthrowable_wrapper instance;
   [[nodiscard]] static const auto& make() {
     return instance;
   }
@@ -123,6 +123,8 @@ private:
 
   friend class error_t<unthrowable_wrapper<ErrorT, ErrorV>>;
 };
+template <class ErrorT, ErrorT ErrorV>
+const inline unthrowable_wrapper<ErrorT, ErrorV> unthrowable_wrapper<ErrorT, ErrorV>::instance{};
 
 template <class ErrorT, ErrorT ErrorV>
 std::exception_ptr unthrowable_wrapper<ErrorT, ErrorV>::carrier_instance = \
@@ -356,9 +358,9 @@ private:
 
     using base_t::base_t;
 
-    template <class Futurator, class ErrorVisitor>
+    template <class Futurator, class Future, class ErrorVisitor>
     [[gnu::noinline]]
-    static auto _safe_then_handle_errors(auto&& future,
+    static auto _safe_then_handle_errors(Future&& future,
                                          ErrorVisitor&& errfunc) {
       maybe_handle_error_t<ErrorVisitor, Futurator> maybe_handle_error(
         std::forward<ErrorVisitor>(errfunc),