diff --git a/include/mio/mmap.hpp b/include/mio/mmap.hpp index 2b8b2ed..6d71b25 100644 --- a/include/mio/mmap.hpp +++ b/include/mio/mmap.hpp @@ -151,7 +151,10 @@ public: * Returns an iterator to the first requested byte, if a valid memory mapping * exists, otherwise this function call is equivalent to invoking `end`. */ - iterator begin() noexcept { return impl_.begin(); } + template< + access_mode A = AccessMode, + typename = typename std::enable_if::type + > iterator begin() noexcept { return impl_.begin(); } const_iterator begin() const noexcept { return impl_.begin(); } const_iterator cbegin() const noexcept { return impl_.cbegin(); }