io: allow write to take rvalue file objects

This simplifies using temporaries in a few locations.
This commit is contained in:
Danny Robson 2018-01-31 19:31:57 +11:00
parent 9045e16476
commit 5d32408126

2
io.hpp
View File

@ -66,7 +66,7 @@ namespace util {
typename IteratorB typename IteratorB
> >
util::view<IteratorA,IteratorB> util::view<IteratorA,IteratorB>
write (DstT &dst, const util::view<IteratorA, IteratorB> src) write (DstT &&dst, const util::view<IteratorA, IteratorB> &src)
{ {
auto remain = src; auto remain = src;
while (!remain.empty ()) while (!remain.empty ())