Remove static_pointer_cast restriction; test dynamic cross cast.

This commit is contained in:
Peter Dimov
2016-09-10 20:07:47 +03:00
parent 8fac3c9f2f
commit 2ae3e4ba44
2 changed files with 49 additions and 28 deletions

View File

@ -94,8 +94,6 @@ template<class T, class U> std::unique_ptr<T> static_pointer_cast( std::unique_p
typedef typename std::unique_ptr<T>::element_type E;
detail::assert_safe_moving_upcast<T, U>();
return std::unique_ptr<T>( static_cast<E*>( r.release() ) );
}