mirror of
https://github.com/vimpunk/mio.git
synced 2025-12-11 22:20:01 +08:00
fixed comments, typedefs
This commit is contained in:
parent
5c9c2e83ad
commit
4084e55430
@ -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
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user