diff options
author | Boyuan Yang <byang@debian.org> | 2023-11-27 22:46:29 -0500 |
---|---|---|
committer | Boyuan Yang <byang@debian.org> | 2023-11-27 22:46:29 -0500 |
commit | 19564cb4f77660cdb2f980ca619d4b979b9fe342 (patch) | |
tree | ff97ccd1471553f1e861c8ea747faa45a023e119 /examples/file_reader.cc | |
parent | d4dbf19f6b0181ee78034bfe4caf189d1c016998 (diff) | |
download | libgav1-19564cb4f77660cdb2f980ca619d4b979b9fe342.tar.gz libgav1-19564cb4f77660cdb2f980ca619d4b979b9fe342.tar.bz2 libgav1-19564cb4f77660cdb2f980ca619d4b979b9fe342.zip |
New upstream version 0.19.0
Diffstat (limited to 'examples/file_reader.cc')
-rw-r--r-- | examples/file_reader.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/file_reader.cc b/examples/file_reader.cc index b096722..a01b7ab 100644 --- a/examples/file_reader.cc +++ b/examples/file_reader.cc @@ -82,7 +82,14 @@ std::unique_ptr<FileReaderInterface> FileReader::Open( return nullptr; } - return file; + // With C++11, to return |file|, an explicit move is required as the return + // type differs from the local variable. Overload resolution isn't guaranteed + // in this case, though some compilers may adopt the C++14 behavior (C++ + // Standard Core Language Issue #1579, Return by converting move + // constructor): + // https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1579 + // To keep things simple we opt for the following compatible form. + return std::unique_ptr<FileReaderInterface>(file.release()); } // IVF Frame Header format, from https://wiki.multimedia.cx/index.php/IVF |