gecko-dev/tools/clang-tidy/test/performance-move-const-arg.cpp

23 строки
410 B
C++

namespace std {
template <typename _Tp>
struct remove_reference {
typedef _Tp type;
};
template <typename _Tp>
constexpr typename std::remove_reference<_Tp>::type &&move(_Tp &&__t) {
return static_cast<typename std::remove_reference<_Tp>::type &&>(__t);
}
} // namespace std
struct TriviallyCopyable {
int i;
};
void f(TriviallyCopyable) {}
void g() {
TriviallyCopyable obj;
f(std::move(obj));
}