From 79e0451bd11645b0dff34c3a6c6131ed68c822f7 Mon Sep 17 00:00:00 2001 From: Jamie Liu Date: Thu, 24 Jan 2019 12:16:54 -0800 Subject: Explicitly std::move() returned std::vector. Otherwise, C++11-compliant compilers may select PosixErrorOr(const T&) as the relevant constructor, and fail because std::vector is not copyable (because Mapping is not copyable). This is a C++11 defect that is fixed in C++14 (and in C++11 mode for Clang, but not GCC). See DR 1579, http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1579. PiperOrigin-RevId: 230767401 Change-Id: I65f481f5188d91db6cbbbd65ed0a60bc55df3401 --- test/syscalls/linux/socket_unix_non_stream.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/syscalls') diff --git a/test/syscalls/linux/socket_unix_non_stream.cc b/test/syscalls/linux/socket_unix_non_stream.cc index 264b7fe6a..a84939011 100644 --- a/test/syscalls/linux/socket_unix_non_stream.cc +++ b/test/syscalls/linux/socket_unix_non_stream.cc @@ -106,7 +106,7 @@ PosixErrorOr> CreateFragmentedRegion(const int size, // The mappings above have taken ownership of the region. region.release(); - return pages; + return std::move(pages); } // A contiguous iov that is heavily fragmented in FileMem can still be sent -- cgit v1.2.3