diff --git a/include/continuable/detail/transforms.hpp b/include/continuable/detail/transforms.hpp index ea8489c..c775b83 100644 --- a/include/continuable/detail/transforms.hpp +++ b/include/continuable/detail/transforms.hpp @@ -100,6 +100,8 @@ public: !defined(CONTINUABLE_WITH_NO_EXCEPTIONS) promise_.set_exception(error); #else + (void)error; + // Can't forward a std::error_condition or custom error type // to a std::promise. Handle the error first in order // to prevent this trap! diff --git a/test/unit-test/test-continuable-base-errors.cpp b/test/unit-test/test-continuable-base-errors.cpp index 70659e0..1758fff 100644 --- a/test/unit-test/test-continuable-base-errors.cpp +++ b/test/unit-test/test-continuable-base-errors.cpp @@ -50,10 +50,12 @@ static auto supply_test_exception() { } #else struct my_error_category : std::error_category { - const char* name() const override noexcept {return "generic name"} + const char* name() const noexcept override { + return "generic name"; + } std::string message(int) const override { - return "generic" + return "generic"; } };