#include <seastar/core/future-util.hh>
+#include "include/ceph_assert.h"
+
namespace crimson {
template<typename Iterator, typename AsyncAction>
}
};
+ // assert_all{ "TODO" };
+ class assert_all {
+ const char* const msg = nullptr;
+ public:
+ template <std::size_t N>
+ assert_all(const char (&msg)[N])
+ : msg(msg) {
+ }
+ assert_all() = default;
+
+ template <class ErrorT, EnableIf<ErrorT>...>
+ void operator()(ErrorT&&) {
+ static_assert(contains_once_v<std::decay_t<ErrorT>>,
+ "discarding disallowed ErrorT");
+ if (msg) {
+ ceph_abort(msg);
+ } else {
+ ceph_abort();
+ }
+ }
+ };
+
template <class ErrorFunc>
static decltype(auto) all_same_way(ErrorFunc&& error_func) {
return all_same_way_t<ErrorFunc>{std::forward<ErrorFunc>(error_func)};
}
};
+ class assert_all {
+ const char* const msg = nullptr;
+ public:
+ template <std::size_t N>
+ assert_all(const char (&msg)[N])
+ : msg(msg) {
+ }
+ assert_all() = default;
+
+ template <class ErrorT>
+ void operator()(ErrorT&&) {
+ if (msg) {
+ ceph_abort(msg);
+ } else {
+ ceph_abort();
+ }
+ }
+ };
+
template <class ErrorFunc>
static decltype(auto) all_same_way(ErrorFunc&& error_func) {
return [