Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Macros
unique_name_macro.hpp File Reference

Provides macros for generating unique identifiers at compile time. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define internal_macro_sham_CONCAT2(a, b)   a##b
 Utility to concatenate two tokens.
 
#define internal_macro_sham_EXPAND2(a, b)   internal_macro_sham_CONCAT2(a, b)
 Utility to expand a macro with two tokens.
 
#define __shamrock_unique_name(base_name)   internal_macro_sham_EXPAND2(base_name, __LINE__)
 

Detailed Description

Provides macros for generating unique identifiers at compile time.

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file unique_name_macro.hpp.

Macro Definition Documentation

◆ __shamrock_unique_name

#define __shamrock_unique_name (   base_name)    internal_macro_sham_EXPAND2(base_name, __LINE__)

Definition at line 32 of file unique_name_macro.hpp.

◆ internal_macro_sham_CONCAT2

#define internal_macro_sham_CONCAT2 (   a,
 
)    a##b

Utility to concatenate two tokens.

Definition at line 20 of file unique_name_macro.hpp.

◆ internal_macro_sham_EXPAND2

#define internal_macro_sham_EXPAND2 (   a,
 
)    internal_macro_sham_CONCAT2(a, b)

Utility to expand a macro with two tokens.

Definition at line 22 of file unique_name_macro.hpp.