| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright 2015 Google Inc. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license that can be | |
| 5 * found in the LICENSE file. | |
| 6 */ | |
| 7 | |
| 8 #ifndef SkUtility_DEFINED | |
| 9 #define SkUtility_DEFINED | |
| 10 | |
| 11 #include "SkTLogic.h" | |
| 12 | |
| 13 namespace skstd { | |
| 14 | |
| 15 template <typename T> inline remove_reference_t<T>&& move(T&& t) { | |
| 16 return static_cast<remove_reference_t<T>&&>(t); | |
| 17 } | |
| 18 | |
| 19 template <typename T> inline T&& forward(remove_reference_t<T>& t) /*noexcept*/
{ | |
| 20 return static_cast<T&&>(t); | |
| 21 } | |
| 22 template <typename T> inline T&& forward(remove_reference_t<T>&& t) /*noexcept*/
{ | |
| 23 static_assert(!is_lvalue_reference<T>::value, | |
| 24 "Forwarding an rvalue reference as an lvalue reference is not
allowed."); | |
| 25 return static_cast<T&&>(t); | |
| 26 } | |
| 27 | |
| 28 template <typename T> add_rvalue_reference_t<T> declval(); | |
| 29 | |
| 30 } // namespace skstd | |
| 31 | |
| 32 #endif | |
| OLD | NEW |