diff --git a/include/mio/mmap.hpp b/include/mio/mmap.hpp index 2e69e63..b7803ea 100644 --- a/include/mio/mmap.hpp +++ b/include/mio/mmap.hpp @@ -103,6 +103,7 @@ public: */ basic_mmap() = default; +#ifdef __cpp_exceptions /** * The same as invoking the `map` function, except any error that may occur * while establishing the mapping is wrapped in a `std::system_error` and is @@ -127,7 +128,7 @@ public: map(handle, offset, length, error); if(error) { throw std::system_error(error); } } - +#endif /** * `basic_mmap` has single-ownership semantics, so transferring ownership * may only be accomplished by moving the object. diff --git a/include/mio/shared_mmap.hpp b/include/mio/shared_mmap.hpp index 6ce187f..19be761 100644 --- a/include/mio/shared_mmap.hpp +++ b/include/mio/shared_mmap.hpp @@ -87,6 +87,7 @@ public: return *this; } +#ifdef __cpp_exceptions /** * The same as invoking the `map` function, except any error that may occur * while establishing the mapping is wrapped in a `std::system_error` and is @@ -111,6 +112,7 @@ public: map(handle, offset, length, error); if(error) { throw std::system_error(error); } } +#endif /** * If this is a read-write mapping and the last reference to the mapping,