From 5a6e136512af4c9e6d5616352856f3217b8622c4 Mon Sep 17 00:00:00 2001 From: lukediamond Date: Sat, 14 Apr 2018 02:00:22 -0400 Subject: [PATCH] Fixed mutable begin() for basic_mmap. --- include/mio/mmap.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); }