Skip to content

Commit 963f06f

Browse files
Make cpp2::move constexpr (#1106)
* cpp2::move is now constexpr * Add `inline` too --------- Co-authored-by: Herb Sutter <[email protected]>
1 parent 60bfbb6 commit 963f06f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/cpp2util.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,13 +485,13 @@ concept valid_custom_is_operator = predicate_member_fun<X, F, &F::op_is>
485485

486486
template <typename T>
487487
requires (std::is_copy_constructible_v<std::remove_cvref_t<T>>)
488-
auto move(T&& t) -> decltype(auto) {
488+
inline constexpr auto move(T&& t) -> decltype(auto) {
489489
return std::move(t);
490490
}
491491

492492
template <typename T>
493493
requires (!std::is_copy_constructible_v<std::remove_cvref_t<T>>)
494-
auto move(T&& t) -> decltype(auto) {
494+
inline constexpr auto move(T&& t) -> decltype(auto) {
495495
return std::forward<T>(t);
496496
}
497497

0 commit comments

Comments
 (0)