Loading src/sled/futures/future.h +2 −1 Original line number Diff line number Diff line #ifndef SLED_FUTURES_FUTURE_H #define SLED_FUTURES_FUTURE_H #include <exception> #pragma once #include "sled/exec/detail/invoke_result.h" #include "sled/futures/internal/failure_handling.h" Loading Loading @@ -59,7 +60,7 @@ struct FutureData { // template<typename T, typename FailureT> template<typename T, typename FailureT = std::exception> class Future { static_assert(!std::is_same<T, void>::value, "Future<void, _> is not allowed. Use Future<bool, _> instead"); static_assert(!std::is_same<FailureT, void>::value, "Future<_, void> is not allowed. Use Future<_, bool> instead"); Loading src/sled/futures/internal/promise.h +9 −9 Original line number Diff line number Diff line Loading @@ -10,18 +10,18 @@ namespace sled { template<typename T, typename FailureT> class Future; template<typename T, typename FailureT> class Promise { template<typename T, typename FailureT = std::exception> class Promise final { static_assert(!std::is_same<T, void>::value, "Promise<void, _> is not allowed. Use Promise<bool, _> instead"); static_assert(!std::is_same<FailureT, void>::value, "Promise<_, void> is not allowed. Use Promise<_, bool> instead"); public: using Value = T; Promise() noexcept = default; Promise(const Promise &) noexcept = default; Promise() = default; Promise(const Promise &) = default; Promise(Promise &&) noexcept = default; Promise &operator=(const Promise &) noexcept = default; Promise &operator=(const Promise &) = default; Promise &operator=(Promise &&) noexcept = default; ~Promise() = default; Loading Loading
src/sled/futures/future.h +2 −1 Original line number Diff line number Diff line #ifndef SLED_FUTURES_FUTURE_H #define SLED_FUTURES_FUTURE_H #include <exception> #pragma once #include "sled/exec/detail/invoke_result.h" #include "sled/futures/internal/failure_handling.h" Loading Loading @@ -59,7 +60,7 @@ struct FutureData { // template<typename T, typename FailureT> template<typename T, typename FailureT = std::exception> class Future { static_assert(!std::is_same<T, void>::value, "Future<void, _> is not allowed. Use Future<bool, _> instead"); static_assert(!std::is_same<FailureT, void>::value, "Future<_, void> is not allowed. Use Future<_, bool> instead"); Loading
src/sled/futures/internal/promise.h +9 −9 Original line number Diff line number Diff line Loading @@ -10,18 +10,18 @@ namespace sled { template<typename T, typename FailureT> class Future; template<typename T, typename FailureT> class Promise { template<typename T, typename FailureT = std::exception> class Promise final { static_assert(!std::is_same<T, void>::value, "Promise<void, _> is not allowed. Use Promise<bool, _> instead"); static_assert(!std::is_same<FailureT, void>::value, "Promise<_, void> is not allowed. Use Promise<_, bool> instead"); public: using Value = T; Promise() noexcept = default; Promise(const Promise &) noexcept = default; Promise() = default; Promise(const Promise &) = default; Promise(Promise &&) noexcept = default; Promise &operator=(const Promise &) noexcept = default; Promise &operator=(const Promise &) = default; Promise &operator=(Promise &&) noexcept = default; ~Promise() = default; Loading