vimpunk / mio

Cross-platform C++11 header-only library for memory mapped file IO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

std::span, std::byte, char8_t, etc (C++20)

Wunkolo opened this issue · comments

commented

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 mio implements a source/sink pattern for its common use case and uses char/unsigned char specializations and implements the begin, cbegin, rbegin, crbegin interface where instead it could be implementing a more robust API using std::byte, char8_t types and std::span. These features are spread across C++14,17,20 though and would break the underlying C++11 nature of the library.

Would it be possible to have conditional language spec detection to add support for some of these features? Or should the library be "broken" to a newer version of C++?