Fix some issues with the no exception build

This commit is contained in:
Denis Blank 2017-10-03 21:59:09 +02:00
parent 1042ddc1f1
commit 1e1f5cdf5b
2 changed files with 6 additions and 2 deletions

View File

@ -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!

View File

@ -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";
}
};