Fix vecr::any unnecessarily moving objects

This commit is contained in:
Nikita Lisitsa 2024-06-22 01:15:48 +03:00
parent bced20ddc6
commit b290bfb063

View file

@ -66,7 +66,7 @@ namespace psemek::vecr
template <typename Shape>
any & operator = (Shape && shape)
{
impl_ = std::make_shared<detail::any_impl<std::decay_t<Shape>>>(std::move(shape));
impl_ = std::make_shared<detail::any_impl<std::decay_t<Shape>>>(std::forward<Shape>(shape));
return *this;
}