@@ -70,9 +70,7 @@ class host_vector : public detail::vector_base<T, Alloc>
7070 * .. versionadded:: 2.2.0
7171 * \endverbatim
7272 */
73- _CCCL_HOST host_vector ()
74- : Parent()
75- {}
73+ _CCCL_HOST host_vector ();
7674
7775 /* ! This constructor creates an empty \p host_vector.
7876 * \param alloc The allocator to use by this host_vector.
@@ -93,7 +91,7 @@ class host_vector : public detail::vector_base<T, Alloc>
9391 */
9492 // Define an empty destructor to explicitly specify
9593 // its execution space qualifier, as a workaround for nvcc warning
96- _CCCL_HOST ~host_vector () = default ;
94+ _CCCL_HOST ~host_vector ();
9795
9896 /* ! This constructor creates a \p host_vector with the given
9997 * size.
@@ -701,6 +699,14 @@ class host_vector : public detail::vector_base<T, Alloc>
701699 }
702700};
703701
702+ // Must define these separately otherwise NVCC complains that __host__ is ignored if the
703+ // functions are explicitly defaulted.
704+ template <typename T, typename Alloc>
705+ host_vector<T, Alloc>::host_vector() = default ;
706+
707+ template <typename T, typename Alloc>
708+ host_vector<T, Alloc>::~host_vector () = default ;
709+
704710/* ! \}
705711 */
706712
0 commit comments