Made the lib work with -fno-exceptions (at least for now).
This commit is contained in:
@@ -457,6 +457,7 @@ inline const char* errorName(StreamError error) MIJIN_NOEXCEPT
|
||||
return "<invalid error>";
|
||||
}
|
||||
|
||||
#if MIJIN_ENABLE_EXCEPTIONS // these functions don't make sense with exceptions disabled
|
||||
inline void throwOnError(mijin::StreamError error)
|
||||
{
|
||||
if (error == mijin::StreamError::SUCCESS) {
|
||||
@@ -500,6 +501,7 @@ inline decltype(auto) throwOnError(StreamResult<TSuccess>&& result, const std::s
|
||||
}
|
||||
return *result;
|
||||
}
|
||||
#endif // MIJIN_ENABLE_EXCEPTIONS
|
||||
} // namespace mijin
|
||||
|
||||
#endif // !defined(MIJIN_IO_STREAM_HPP_INCLUDED)
|
||||
|
||||
Reference in New Issue
Block a user