add own bse::move
This commit is contained in:
17
c_os/user/lib/Utility.h
Normal file
17
c_os/user/lib/Utility.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#ifndef __Utility_Include_H_
|
||||||
|
#define __Utility_Include_H_
|
||||||
|
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
|
namespace bse {
|
||||||
|
|
||||||
|
// All std::move does is cast to an rvalue reference
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
typename std::remove_reference_t<T>&&
|
||||||
|
move(T&& t) {
|
||||||
|
return static_cast<typename std::remove_reference_t<T>&&>(t);
|
||||||
|
}
|
||||||
|
} // namespace bse
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user