Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test-packaging/example.cpp')
-rw-r--r--test-packaging/example.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test-packaging/example.cpp b/test-packaging/example.cpp
index b64a98d2..006d59f5 100644
--- a/test-packaging/example.cpp
+++ b/test-packaging/example.cpp
@@ -31,11 +31,11 @@ int main()
namespace llfio = LLFIO_V2_NAMESPACE;
auto r = []() -> llfio::result<int> {
- OUTCOME_TRY(auto fh, llfio::file_handle::temp_file());
+ OUTCOME_TRY(auto &&fh, llfio::file_handle::temp_file());
static const char *buffers[] = { "He", "llo", " world" };
OUTCOME_TRY(fh.write(0, { { (const llfio::byte *) buffers[0], 2 }, { (const llfio::byte *) buffers[1], 3 }, { (const llfio::byte *) buffers[2], 6 } } ));
llfio::byte buffer[64];
- OUTCOME_TRY(auto read, fh.read(0, { {buffer, sizeof(buffer)} }));
+ OUTCOME_TRY(auto &&read, fh.read(0, { {buffer, sizeof(buffer)} }));
if(read != 11)
{
std::cerr << "FAILURE: Did not read 11 bytes!" << std::endl;