mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
sprout/utility/move.hpp 追加
tuple に要素数の異なるタプルからの暗黙の変換を追加
This commit is contained in:
parent
40036a4c05
commit
e11c2eb867
5 changed files with 74 additions and 16 deletions
|
@ -17,4 +17,3 @@ namespace sprout {
|
|||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_UTILITY_FORWARD_HPP
|
||||
|
||||
|
|
17
sprout/utility/move.hpp
Normal file
17
sprout/utility/move.hpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef SPROUT_UTILITY_MOVE_HPP
|
||||
#define SPROUT_UTILITY_MOVE_HPP
|
||||
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// move
|
||||
//
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR typename std::remove_reference<T>::type&& move(T&& t) SPROUT_NOEXCEPT {
|
||||
return static_cast<typename std::remove_reference<T>::type&&>(t);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_UTILITY_MOVE_HPP
|
8
sprout/utility/operation.hpp
Normal file
8
sprout/utility/operation.hpp
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef SPROUT_UTILITY_OPERATION_HPP
|
||||
#define SPROUT_UTILITY_OPERATION_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
#include <sprout/utility/move.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_UTILITY_OPERATION_HPP
|
Loading…
Add table
Add a link
Reference in a new issue