diff --git a/io.hpp b/io.hpp index dedfc514..72773185 100644 --- a/io.hpp +++ b/io.hpp @@ -148,6 +148,17 @@ namespace cruft { } + template + requires (std::is_trivial_v) + ValueT + read (cruft::posix::fd &src) + { + ValueT res; + read (src, cruft::make_byte_view (res)); + return res; + } + + /////////////////////////////////////////////////////////////////////////// class indenter : public std::streambuf { protected: