Open DarthGandalf opened 4 years ago
Would be great to have an std::span<const std::byte>
interface as well in the case of C++20.
Still relevant. Not sure what changed on my end, but the above syntax suddenly is giving me incomplete reads. A file of 681 bytes is parsed only up to 181 bytes. file.end() - file.begin()
still correctly reports 681.
I'll mess around and will probably find a way to get the whole thing, but it would be great if CMRC provides a trivial interface for getting the data in an idiomatic way. Having to mess with char*
is not ideal to begin with.
I'll probably resort to this:
std::vector<char> data(file.begin(), file.end());
which so far seems to yield correct results.
I just create a pull request to support using string_view as key to open and find resource.
Please provide one.
My current workaround is:
std::string_view data(file.begin(), file.end() - file.begin());