diff --git a/toml/exception.hpp b/toml/exception.hpp index c219216..2b0bc63 100644 --- a/toml/exception.hpp +++ b/toml/exception.hpp @@ -4,6 +4,7 @@ #define TOML11_EXCEPTION_HPP #include #include +#include #include "source_location.hpp" @@ -17,7 +18,8 @@ struct file_io_error : public std::runtime_error : std::runtime_error(msg + " \"" + fname + "\": " + std::strerror(errnum)), errno_(errnum) {} - int get_errno() {return errno_;} + int get_errno() const noexcept {return errno_;} + private: int errno_; };