From 9e6ecd36611f143c2c72def72f45df057c538bc7 Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa <miscco@nvidia.com> Date: Mon, 27 Jan 2025 19:04:04 +0100 Subject: [PATCH] Avoid compiler issues with default constructor --- libcudacxx/include/cuda/std/__mdspan/empty_base.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libcudacxx/include/cuda/std/__mdspan/empty_base.h b/libcudacxx/include/cuda/std/__mdspan/empty_base.h index f218b0a7c61..7a2d4dcfeaa 100644 --- a/libcudacxx/include/cuda/std/__mdspan/empty_base.h +++ b/libcudacxx/include/cuda/std/__mdspan/empty_base.h @@ -46,7 +46,7 @@ struct _CCCL_DECLSPEC_EMPTY_BASES __mdspan_ebco_impl _CCCL_EXEC_CHECK_DISABLE _CCCL_TEMPLATE(class... _Args) - _CCCL_REQUIRES(_CCCL_TRAIT(is_constructible, _Elem, _Args...)) + _CCCL_REQUIRES((sizeof...(_Args) != 0) _CCCL_AND _CCCL_TRAIT(is_constructible, _Elem, _Args...)) _LIBCUDACXX_HIDE_FROM_ABI constexpr __mdspan_ebco_impl(_Args&&... __args) noexcept( _CCCL_TRAIT(is_nothrow_constructible, _Elem, _Args...)) : __elem_(_CUDA_VSTD::forward<_Args>(__args)...) @@ -75,7 +75,7 @@ struct _CCCL_DECLSPEC_EMPTY_BASES __mdspan_ebco_impl<_Index, _Elem, true> : _Ele _CCCL_EXEC_CHECK_DISABLE _CCCL_TEMPLATE(class... _Args) - _CCCL_REQUIRES(_CCCL_TRAIT(is_constructible, _Elem, _Args...)) + _CCCL_REQUIRES((sizeof...(_Args) != 0) _CCCL_AND _CCCL_TRAIT(is_constructible, _Elem, _Args...)) _LIBCUDACXX_HIDE_FROM_ABI constexpr __mdspan_ebco_impl(_Args&&... __args) noexcept( _CCCL_TRAIT(is_nothrow_constructible, _Elem, _Args...)) : _Elem(_CUDA_VSTD::forward<_Args>(__args)...) @@ -108,7 +108,7 @@ struct _CCCL_DECLSPEC_EMPTY_BASES __mdspan_ebco<_Elem1> : __mdspan_ebco_impl<0, _CCCL_EXEC_CHECK_DISABLE _CCCL_TEMPLATE(class... _Args) - _CCCL_REQUIRES(_CCCL_TRAIT(is_constructible, _Elem1, _Args...)) + _CCCL_REQUIRES((sizeof...(_Args) != 0) _CCCL_AND _CCCL_TRAIT(is_constructible, _Elem1, _Args...)) _LIBCUDACXX_HIDE_FROM_ABI constexpr __mdspan_ebco(_Args&&... __args) noexcept( _CCCL_TRAIT(is_nothrow_constructible, _Elem1, _Args...)) : __base1(_CUDA_VSTD::forward<_Args>(__args)...)