mirror of
https://github.com/momo5502/hypervisor.git
synced 2025-07-04 02:01:58 +00:00
Progress
This commit is contained in:
@ -11,44 +11,3 @@ void __cdecl operator delete(void *ptr, size_t);
|
||||
void __cdecl operator delete(void *ptr);
|
||||
void __cdecl operator delete[](void *ptr, size_t);
|
||||
void __cdecl operator delete[](void *ptr);
|
||||
|
||||
// TEMPLATE CLASS remove_reference
|
||||
template<class _Ty>
|
||||
struct remove_reference
|
||||
{ // remove reference
|
||||
typedef _Ty type;
|
||||
};
|
||||
|
||||
template<class _Ty>
|
||||
struct remove_reference<_Ty&>
|
||||
{ // remove reference
|
||||
typedef _Ty type;
|
||||
};
|
||||
|
||||
template<class _Ty>
|
||||
struct remove_reference<_Ty&&>
|
||||
{ // remove rvalue reference
|
||||
typedef _Ty type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
typename remove_reference<T>::type&& move(T&& arg)
|
||||
{
|
||||
return static_cast<typename remove_reference<T>::type&&>(arg);
|
||||
}
|
||||
|
||||
// TEMPLATE FUNCTION forward
|
||||
template<class _Ty> inline
|
||||
constexpr _Ty&& forward(
|
||||
typename remove_reference<_Ty>::type& _Arg)
|
||||
{ // forward an lvalue as either an lvalue or an rvalue
|
||||
return (static_cast<_Ty&&>(_Arg));
|
||||
}
|
||||
|
||||
template<class _Ty> inline
|
||||
constexpr _Ty&& forward(
|
||||
typename remove_reference<_Ty>::type&& _Arg)
|
||||
{ // forward an rvalue as an rvalue
|
||||
return (static_cast<_Ty&&>(_Arg));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user