io: add slurp overload for string views
This commit is contained in:
parent
c4e0cd31f9
commit
8682381618
7
io.hpp
7
io.hpp
@ -39,6 +39,13 @@ namespace util {
|
|||||||
template <typename T = std::byte>
|
template <typename T = std::byte>
|
||||||
std::vector<T> slurp (const std::experimental::filesystem::path&);
|
std::vector<T> slurp (const std::experimental::filesystem::path&);
|
||||||
|
|
||||||
|
template <typename T = std::byte, typename A, typename B>
|
||||||
|
std::vector<T> slurp (util::view<A,B> path)
|
||||||
|
{
|
||||||
|
const std::experimental::filesystem::path src { path.begin (), path.end () };
|
||||||
|
return slurp<T> (src);
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T = std::byte>
|
template <typename T = std::byte>
|
||||||
std::vector<T> slurp (FILE *);
|
std::vector<T> slurp (FILE *);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user