diff --git a/libcudacxx/include/cuda/std/__expected/bad_expected_access.h b/libcudacxx/include/cuda/std/__expected/bad_expected_access.h index d3d78755001..2d788b8b381 100644 --- a/libcudacxx/include/cuda/std/__expected/bad_expected_access.h +++ b/libcudacxx/include/cuda/std/__expected/bad_expected_access.h @@ -66,6 +66,9 @@ template class bad_expected_access : public bad_expected_access { public: +# if _CCCL_CUDA_COMPILER(CLANG) // Clang needs this or it breaks with device only types + _CCCL_HOST_DEVICE +# endif // _CCCL_CUDA_COMPILER(CLANG) _CCCL_HIDE_FROM_ABI explicit bad_expected_access(_Err __e) : __unex_(_CUDA_VSTD::move(__e)) {}