Changeset c866a83 in mainline for uspace/lib/cpp/include/impl/utility.hpp
- Timestamp:
- 2018-07-05T21:41:23Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 614b07e
- Parents:
- daef596
- git-author:
- Dzejrou <dzejrou@…> (2018-05-05 16:42:49)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:23)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/impl/utility.hpp
rdaef596 rc866a83 32 32 #include <cstdint> 33 33 #include <internal/type_transformation.hpp> 34 #include <internal/utility/forward_move.hpp> 34 35 #include <type_traits> 35 36 … … 65 66 return !(lhs < rhs); 66 67 } 67 }68 69 /**70 * 20.2.4, forward/move helpers:71 */72 73 template<class T>74 constexpr T&& forward(remove_reference_t<T>& t) noexcept75 {76 return static_cast<T&&>(t);77 }78 79 template<class T>80 constexpr T&& forward(remove_reference_t<T>&& t) noexcept81 {82 return static_cast<T&&>(t);83 }84 85 template<class T>86 constexpr remove_reference_t<T>&& move(T&& t) noexcept87 {88 return static_cast<remove_reference_t<T>&&>(t);89 68 } 90 69 … … 124 103 return old_val; 125 104 } 126 127 /**128 * 20.2.5, function template declval:129 * Note: This function only needs declaration, not130 * implementation.131 */132 133 template<class T>134 add_rvalue_reference_t<T> declval() noexcept;135 105 136 106 /**
Note:
See TracChangeset
for help on using the changeset viewer.