Closed jdarpinian closed 6 years ago
Just realized that the mapping functions could be overloaded to just map(path|handle, error_code&)
to provide the same default behavior of mapping the entire file. Would you be willing to implement these as well? It's ok if not, I can patch it after merging your PR.
Done!
Great work, thank you so much!
@jdarpinian That's a great idea, thanks! This is something I wanted to do as well, but I hit a wall when trying to extend the idea to the
map
member functions, which take astd::error_code&
as their last argument. In retrospect, I think it should have been the first argument, or even the return value--though this would have broken symmetry with APIs that return something else and thus need error code to be an out parameter. But I digress.Can you please apply the same changes to
basic_shared_mmap
as well (preferably as an amended commit)?