diff --git a/include/mio/detail/basic_mmap.hpp b/include/mio/detail/basic_mmap.hpp index 7488782..512d537 100644 --- a/include/mio/detail/basic_mmap.hpp +++ b/include/mio/detail/basic_mmap.hpp @@ -70,7 +70,6 @@ template struct basic_mmap static_assert(sizeof(ByteT) == sizeof(char), "ByteT must be the same size as char."); private: - // Points to the first requested byte, and not to the actual start of the mapping. pointer data_ = nullptr; @@ -94,7 +93,6 @@ private: bool is_handle_internal_; public: - basic_mmap() = default; basic_mmap(const basic_mmap&) = delete; basic_mmap& operator=(const basic_mmap&) = delete; @@ -146,7 +144,6 @@ public: void swap(basic_mmap& other); private: - pointer get_mapping_start() noexcept { return !data() ? nullptr : data() - offset(); } }; diff --git a/include/mio/mmap.hpp b/include/mio/mmap.hpp index 183bbfa..7c1b0be 100644 --- a/include/mio/mmap.hpp +++ b/include/mio/mmap.hpp @@ -40,15 +40,10 @@ template< typename ByteT > class basic_mmap { - static_assert(AccessMode == access_mode::read - || AccessMode == access_mode::write, - "AccessMode must be either read or write"); - using impl_type = detail::basic_mmap; impl_type impl_; public: - using value_type = typename impl_type::value_type; using size_type = typename impl_type::size_type; using reference = typename impl_type::reference; diff --git a/include/mio/shared_mmap.hpp b/include/mio/shared_mmap.hpp index 1aae4eb..d1a4a2e 100644 --- a/include/mio/shared_mmap.hpp +++ b/include/mio/shared_mmap.hpp @@ -44,7 +44,6 @@ template< std::shared_ptr pimpl_; public: - using value_type = typename impl_type::value_type; using size_type = typename impl_type::size_type; using reference = typename impl_type::reference; @@ -315,7 +314,6 @@ public: } private: - template void map_impl(const MappingToken& token, const size_type offset, const size_type length, std::error_code& error) diff --git a/test/example.cpp b/test/example.cpp index 5385ffc..304e3e6 100644 --- a/test/example.cpp +++ b/test/example.cpp @@ -1,4 +1,4 @@ -#include +#include "../include/mio/mmap.hpp" #include // for std::error_code #include // for std::printf #include