diff --git a/include/boost/scope/unique_resource.hpp b/include/boost/scope/unique_resource.hpp index 706b44a..039f762 100644 --- a/include/boost/scope/unique_resource.hpp +++ b/include/boost/scope/unique_resource.hpp @@ -727,7 +727,7 @@ class unique_resource_data< Resource, Deleter, Traits, true > : std::is_nothrow_constructible< resource_holder, R, D, bool >, std::is_nothrow_constructible< deleter_holder, D, resource_type&, bool > >::value) : - unique_resource_data(static_cast< R&& >(res), static_cast< D&& >(del), traits_type::is_allocated(static_cast< R&& >(res))) + unique_resource_data(static_cast< R&& >(res), static_cast< D&& >(del), traits_type::is_allocated(res)) // don't forward res to is_allocated to make sure res is not moved-from on resource construction { }