Skip to content

Commit

Permalink
Fix compiler detection
Browse files Browse the repository at this point in the history
  • Loading branch information
miscco committed Jan 31, 2025
1 parent 5b8f220 commit b1d45a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions libcudacxx/include/cuda/std/detail/libcxx/include/variant
Original file line number Diff line number Diff line change
Expand Up @@ -1927,11 +1927,11 @@ private:
return __op(_CUDA_VSTD::get<0>(__lhs), _CUDA_VSTD::get<0>(__rhs));
}
// We already checked that every variant has a value, so we should never reach this line
# if _CCCL_COMPILER(MSVC) // MSVC needs this to be wrapped in a function or it will error
# if defined(_CCCL_COMPILER_MSVC) // MSVC needs this to be wrapped in a function or it will error
_CUDA_VSTD::unreachable();
# else // ^^^ _CCCL_COMPILER(MSVC) ^^^ / vvv !_CCCL_COMPILER(MSVC) vvv
# else // ^^^ _CCCL_COMPILER_MSVC ^^^ / vvv !_CCCL_COMPILER_MSVC vvv
_LIBCUDACXX_UNREACHABLE();
# endif // !_CCCL_COMPILER(MSVC)
# endif // !_CCCL_COMPILER_MSVC
}
};

Expand Down
4 changes: 2 additions & 2 deletions libcudacxx/test/support/host_device_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <cuda/std/initializer_list>
#include <cuda/std/utility>

#if !_CCCL_COMPILER(NVRTC)
#if !defined(_CCCL_COMPILER_NVRTC)
struct host_only_type
{
int val_;
Expand Down Expand Up @@ -77,7 +77,7 @@ struct host_only_type
cuda::std::swap(val_, other.val_);
}
};
#endif // !_CCCL_COMPILER(NVRTC)
#endif // !_CCCL_COMPILER_NVRTC

#if _CCCL_HAS_CUDA_COMPILER
struct device_only_type
Expand Down

0 comments on commit b1d45a0

Please sign in to comment.