Skip to content

Commit 0ba7c51

Browse files
committed
fixup! modernize-use-equals-default
1 parent b550fdd commit 0ba7c51

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

libcudacxx/include/cuda/std/__utility/typeid.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ struct __type_info_ref_ : __type_info
302302
: __type_info(__other)
303303
{}
304304

305-
_CCCL_API constexpr __type_info_ref_(__type_info_ref_ const& __other) noexcept = default;
305+
_CCCL_HIDE_FROM_ABI constexpr __type_info_ref_(__type_info_ref_ const& __other) noexcept = default;
306306
};
307307

308308
[[nodiscard]] _CCCL_API constexpr __type_info_ref_ __type_info_ptr_::operator*() const noexcept
@@ -371,8 +371,8 @@ struct __type_info
371371
}
372372

373373
# if _CCCL_STD_VER <= 2017
374-
[[nodiscard]] _CCCL_HOST_API friend constexpr bool
375-
operator!=(const __type_info& __lhs, const __type_info& __rhs) noexcept
374+
[[nodiscard]]
375+
_CCCL_HOST_API friend constexpr bool operator!=(const __type_info& __lhs, const __type_info& __rhs) noexcept
376376
{
377377
return !(__lhs == __rhs);
378378
}

thrust/thrust/host_vector.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)