diff --git a/octa/range.h b/octa/range.h index d004740..1ec3e3f 100644 --- a/octa/range.h +++ b/octa/range.h @@ -9,7 +9,7 @@ #include #include "octa/types.h" -#include "octa/traits.h" +#include "octa/utility.h" namespace octa { struct InputRange {}; diff --git a/octa/traits.h b/octa/traits.h index 201706d..99f2949 100644 --- a/octa/traits.h +++ b/octa/traits.h @@ -165,28 +165,6 @@ namespace octa { template struct IsArray : false_t {}; template struct IsArray: true_t {}; template struct IsArray: true_t {}; - - /* move */ - - template - static inline constexpr typename RemoveReference::type && - move(T &&v) noexcept { - return static_cast::type &&>(v); - } - - /* forward */ - - template - static inline constexpr T && - forward(typename RemoveReference::type &v) noexcept { - return static_cast(v); - } - - template - static inline constexpr T && - forward(typename RemoveReference::type &&v) noexcept { - return static_cast(v); - } } #endif \ No newline at end of file diff --git a/octa/utility.h b/octa/utility.h index 6e28e58..6960070 100644 --- a/octa/utility.h +++ b/octa/utility.h @@ -50,6 +50,24 @@ namespace octa { swap(a[i], b[i]); } } + + template + static inline constexpr typename RemoveReference::type && + move(T &&v) noexcept { + return static_cast::type &&>(v); + } + + template + static inline constexpr T && + forward(typename RemoveReference::type &v) noexcept { + return static_cast(v); + } + + template + static inline constexpr T && + forward(typename RemoveReference::type &&v) noexcept { + return static_cast(v); + } } #endif \ No newline at end of file