Skip to content

Commit

Permalink
Merge branch 'fix-cccl-requires-expr-macro' into cudax-any-resource-r…
Browse files Browse the repository at this point in the history
…edux
  • Loading branch information
ericniebler committed Dec 13, 2024
2 parents d479a5f + ec5078c commit 452c16d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions libcudacxx/include/cuda/std/__cccl/preprocessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
# define _CCCL_HAS_INCLUDE(_X) 0
#endif

#ifdef __COUNTER__
# define _CCCL_COUNTER() __COUNTER__
#else
# define _CCCL_COUNTER() __LINE__
#endif

#define _CCCL_PP_EXPAND(...) __VA_ARGS__
#define _CCCL_PP_EAT(...)

Expand Down
6 changes: 3 additions & 3 deletions libcudacxx/include/cuda/std/__concepts/concept_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,12 @@ namespace __cccl_unqualified_cuda_std = _CUDA_VSTD; // NOLINT(misc-unused-alias-

# define _CCCL_REQUIRES_EXPR(_TY, ...) \
::__cccl_requires_expr_impl< \
struct _CCCL_PP_CAT(__cccl_requires_expr_detail_, __LINE__) _CCCL_REQUIRES_EXPR_EXPAND_TPARAMS \
struct _CCCL_PP_CAT(__cccl_requires_expr_detail_, _CCCL_COUNTER()) _CCCL_REQUIRES_EXPR_EXPAND_TPARAMS \
_TY>::__cccl_is_satisfied(static_cast<::__cccl_tag<void _CCCL_REQUIRES_EXPR_EXPAND_TPARAMS _TY>*>(nullptr), \
static_cast<void (*)(__VA_ARGS__)>(nullptr)); \
struct _CCCL_PP_CAT(__cccl_requires_expr_detail_, __LINE__) \
struct _CCCL_PP_CAT(__cccl_requires_expr_detail_, _CCCL_COUNTER()) \
{ \
using __cccl_self_t = _CCCL_PP_CAT(__cccl_requires_expr_detail_, __LINE__); \
using __cccl_self_t = _CCCL_PP_CAT(__cccl_requires_expr_detail_, _CCCL_COUNTER()); \
template <class _CCCL_REQUIRES_EXPR_TPARAMS _TY> \
_LIBCUDACXX_HIDE_FROM_ABI static auto __cccl_well_formed(__VA_ARGS__) _CCCL_REQUIRES_EXPR_2

Expand Down

0 comments on commit 452c16d

Please sign in to comment.