gecko-dev/tools/clang-tidy/test/performance-move-const-arg.cpp
Jan Keromnes 11dd9afb58 Bug 1486410 - Bug 1466427 - Enable new clang-tidy 7.0 checks. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D4210

--HG--
extra : moz-landing-system : lando
2018-09-04 11:55:19 +00:00

22 lines
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));
}