I'm trying to mask a structure name like so:
#define cat_val(l, r) l##r
#define name_mask cat_val(exception_, __COUNTER__)
using i_dont_show_in_rtti = struct name_mask
{
// ...
};
void test()
{
throw i_dont_show_in_rtti{};
}
This works, but only individually in files. If I include a file that has done this, I'll get a naming conflict (since __COUNTER__ resets per file).
What are my other options? Is there another way I can just mutate a name so it's unintelligable yet unique without making my code unreasonably ugly?