acadia/lib/glacier/memory/move.h

26 lines
410 B
C
Raw Normal View History

2023-06-26 11:13:06 -07:00
#pragma once
namespace glcr {
template <typename T>
struct RemoveReference {
typedef T type;
};
template <typename T>
struct RemoveReference<T&> {
typedef T type;
};
template <typename T>
struct RemoveReference<T&&> {
typedef T type;
};
template <typename T>
typename RemoveReference<T>::type&& Move(T&& arg) {
return static_cast<typename RemoveReference<T>::type&&>(arg);
}
} // namespace glcr