mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
chore: Mark detail:forward_like as constexpr (#4147)
This commit is contained in:
parent
2d59b43cbf
commit
81f35d29c6
@ -45,7 +45,7 @@ using forwarded_type = conditional_t<std::is_lvalue_reference<T>::value,
|
|||||||
/// Forwards a value U as rvalue or lvalue according to whether T is rvalue or lvalue; typically
|
/// Forwards a value U as rvalue or lvalue according to whether T is rvalue or lvalue; typically
|
||||||
/// used for forwarding a container's elements.
|
/// used for forwarding a container's elements.
|
||||||
template <typename T, typename U>
|
template <typename T, typename U>
|
||||||
forwarded_type<T, U> forward_like(U &&u) {
|
constexpr forwarded_type<T, U> forward_like(U &&u) {
|
||||||
return std::forward<detail::forwarded_type<T, U>>(std::forward<U>(u));
|
return std::forward<detail::forwarded_type<T, U>>(std::forward<U>(u));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user