mio
mio copied to clipboard
Cross-platform C++11 header-only library for memory mapped file IO
Hi, I get this linker error if I have #include "mio/mmap.hpp" in more than one cpp file: error LNK2005: "class std::basic_string __cdecl mio::detail::win::s_2_ws(class std::basic_string const &)" (?s_2_ws@win@detail@mio@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@5@@Z) already defined in...
I have been using *mio* to allow some memory-mapping access to disk files in my packages (R/C++); it works quite well, thanks for that. However, a few users who use...
These changes add a new access mode that performs copy-on-write, allowing changes to be made to the data in memory without them being committed to the file system. The new...
This fixes a linker error about duplicate symbols, if you include the mio headers from multiple source files.
## Description When compiled with MSVC (or clang-cl on Windows), the compiler complains `vector` is not found. ## Reproduction 1. Create a C++ source file 2. Paste the following code...
I pass a string_view to map_source instead of a null-terminated string. detail::open_file() or win::open_file_helper() use c_str(...) and c_str(...) is casting std::string.data() to a char*. This way the string length is...
A small improvement suggestion I have is that `mio` does not accept an object of type `std::filesystem::path` for mapped file paths: ``` const std::filesystem::path file_path = "..."; mio::mmap_source mapped_file(file_path); //...
`std::span`, `std::byte`, `char8_t` and such are currently supported in a lot of compilers out there and I feel like mio would directly benefit from some of these features. Right now...
This avoids confusion and unifies the interface. Suggested in #61.
Is this supported on armv7?