diff --git a/core/src/Kokkos_CopyViews.hpp b/core/src/Kokkos_CopyViews.hpp index 51e79b206dd..c3616d8d552 100644 --- a/core/src/Kokkos_CopyViews.hpp +++ b/core/src/Kokkos_CopyViews.hpp @@ -3612,13 +3612,11 @@ void check_view_ctor_args_create_mirror_view_and_copy() { "not explicitly allow padding!"); } -} // namespace Impl - -template ::specialize>::value>> auto create_mirror_view_and_copy( - const Impl::ViewCtorProp& arg_prop, - const Kokkos::View& src) { + const Kokkos::View& src, + const Impl::ViewCtorProp& arg_prop) { using alloc_prop_input = Impl::ViewCtorProp; Impl::check_view_ctor_args_create_mirror_view_and_copy(); @@ -3649,20 +3647,25 @@ auto create_mirror_view_and_copy( } } -// Previously when using auto here, the intel compiler 19.3 would -// sometimes not create a symbol, guessing that it somehow is a combination -// of auto and just forwarding arguments (see issue #5196) +} // namespace Impl + +// space and name template ::value>> -typename Impl::MirrorViewType::view_type -create_mirror_view_and_copy( + class = std::enable_if_t::value>> +auto create_mirror_view_and_copy( const Space&, const Kokkos::View& src, - std::string const& name = "", - std::enable_if_t< - std::is_void::specialize>::value>* = - nullptr) { - return create_mirror_view_and_copy( - Kokkos::view_alloc(typename Space::memory_space{}, name), src); + std::string const& name = "") { + return Kokkos::Impl::create_mirror_view_and_copy( + src, + Kokkos::view_alloc(typename Space::memory_space{}, name)); +} + +// view_constructor_args +template +auto create_mirror_view_and_copy( + const Impl::ViewCtorProp& arg_prop, + const Kokkos::View& src) { + return Kokkos::Impl::create_mirror_view_and_copy(src, arg_prop); } } /* namespace Kokkos */