Skip to content

Commit 32f3676

Browse files
authored
[Base] remove __COUNTER__ from unique_name macro (clang-22 c2y extensions) (#1783)
see catchorg/Catch2#3076
1 parent ad7f503 commit 32f3676

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/shambase/include/shambase/unique_name_macro.hpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,8 @@
2525
* @fn __shamrock_unique_name
2626
* @brief Macro to create a unique name.
2727
*
28-
* This macro creates a unique identifier from `base_name` using `__COUNTER__` or `__LINE__`.
28+
* This macro creates a unique identifier from `base_name` using `__LINE__`.
2929
* @note The `__LINE__` fallback is not unique for multiple uses on the same line.
3030
*/
3131

32-
#ifdef __COUNTER__
33-
#define __shamrock_unique_name(base_name) internal_macro_sham_EXPAND2(base_name, __COUNTER__)
34-
#else
35-
#define __shamrock_unique_name(base_name) internal_macro_sham_EXPAND2(base_name, __LINE__)
36-
#endif
32+
#define __shamrock_unique_name(base_name) internal_macro_sham_EXPAND2(base_name, __LINE__)

0 commit comments

Comments
 (0)