// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_TEST_GMOCK_MOVE_SUPPORT_H_ #define BASE_TEST_GMOCK_MOVE_SUPPORT_H_ #include #include // A similar action as testing::SaveArg, but it does an assignment with // std::move() instead of always performing a copy. template auto MoveArg(T* out) { return [out](auto&&... args) { *out = std::move(std::get(std::tie(args...))); }; } #endif // BASE_TEST_GMOCK_MOVE_SUPPORT_H_