diff --git a/.clang-format b/.clang-format index d081c43b21..c67388c9ff 100644 --- a/.clang-format +++ b/.clang-format @@ -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 diff --git a/libcudacxx/include/cuda/std/__cccl/dialect.h b/libcudacxx/include/cuda/std/__cccl/dialect.h index 06387172b9..9fc96fbc8b 100644 --- a/libcudacxx/include/cuda/std/__cccl/dialect.h +++ b/libcudacxx/include/cuda/std/__cccl/dialect.h @@ -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