Skip to content

Commit

Permalink
Drop _CCCL_ELSE_IF_CONSTEXPR (#2966)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Schellenberger Costa <[email protected]>
  • Loading branch information
bernhardmgruber and miscco authored Nov 30, 2024
1 parent 24de203 commit 233aec4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always
FixNamespaceComments: true
IfMacros: [
'_CCCL_IF_CONSTEXPR',
'_CCCL_ELSE_IF_CONSTEXPR',
'_CCCL_IF_CONSTEXPR'
]
IndentWrappedFunctionNames: false
IncludeBlocks: Regroup
Expand Down
6 changes: 2 additions & 4 deletions libcudacxx/include/cuda/std/__cccl/dialect.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,10 @@
#endif // _CCCL_STD_VER <= 2020

#if _CCCL_STD_VER >= 2017 && defined(__cpp_if_constexpr)
# define _CCCL_IF_CONSTEXPR if constexpr
# define _CCCL_ELSE_IF_CONSTEXPR else if constexpr
# define _CCCL_IF_CONSTEXPR if constexpr
#else // ^^^ C++17 ^^^ / vvv C++14 vvv
# define _CCCL_NO_IF_CONSTEXPR
# define _CCCL_IF_CONSTEXPR if
# define _CCCL_ELSE_IF_CONSTEXPR else if
# define _CCCL_IF_CONSTEXPR if
#endif // _CCCL_STD_VER <= 2014

// In nvcc prior to 11.3 global variables could not be marked constexpr
Expand Down

0 comments on commit 233aec4

Please sign in to comment.