fixed comments, typedefs

This commit is contained in:
mandreyel 2017-10-05 16:37:30 +02:00
parent 5c9c2e83ad
commit 4084e55430
2 changed files with 5 additions and 1 deletions

View File

@ -29,7 +29,6 @@ namespace mio {
// This is used by basic_mmap to determine whether to create a read-only or a read-write
// memory mapping. The two possible values are `read_only` and `read_write`.
// TODO try to better expose these values
using detail::access_mode;
// This value may be provided as the `length` parameter to the constructor or
@ -298,12 +297,14 @@ template<
typename CharTraits = std::char_traits<CharT>
> using basic_mmap_sink = basic_mmap<access_mode::read_write, CharT, CharTraits>;
/** These aliases should cover the most common use cases. */
using mmap_source = basic_mmap_source<char>;
using ummap_source = basic_mmap_source<unsigned char>;
using mmap_sink = basic_mmap_sink<char>;
using ummap_sink = basic_mmap_sink<unsigned char>;
/** Convenience factory method that constructs a mapping for any basic_mmap<> type. */
template<
typename MMap,
typename MappingToken

View File

@ -68,5 +68,8 @@ int main()
m = mio::make_mmap_source(path, 100 * buffer.size(), buffer.size(), error);
CHECK_INVALID_MMAP(m);
// Just making sure custom types compile.
mio::ummap_source ummap;
std::printf("all tests passed!\n");
}