1
0
Fork 0
firefox/tools/clang-tidy/test/performance-move-const-arg.cpp
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

33 lines
524 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;
};
class A {
public:
A() {}
A(const A &rhs) {}
A(A &&rhs) {}
};
void f(TriviallyCopyable) {}
void g() {
TriviallyCopyable obj;
f(std::move(obj));
}
A f5(const A x5) {
return std::move(x5);
}