Update example include and minor style change

This commit is contained in:
mandreyel 2018-07-12 21:31:53 +02:00
parent c6039f7ab5
commit 7dfc49b197
4 changed files with 1 additions and 11 deletions

View File

@ -70,7 +70,6 @@ template<typename ByteT> 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(); }
};

View File

@ -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<ByteT>;
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;

View File

@ -44,7 +44,6 @@ template<
std::shared_ptr<impl_type> 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<typename MappingToken>
void map_impl(const MappingToken& token, const size_type offset,
const size_type length, std::error_code& error)

View File

@ -1,4 +1,4 @@
#include <mio/mmap.hpp>
#include "../include/mio/mmap.hpp"
#include <system_error> // for std::error_code
#include <cstdio> // for std::printf
#include <cassert>