Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace protect macros #13

Open
jrefice opened this issue Jun 30, 2021 · 0 comments
Open

Namespace protect macros #13

jrefice opened this issue Jun 30, 2021 · 0 comments

Comments

@jrefice
Copy link
Contributor

jrefice commented Jun 30, 2021

The macros in FC4SC aren't protected with a common prefix:

#define GET_SCP_MACRO(_1,_2,NAME,...) NAME
#define SCOPE_DECL(...) GET_SCP_MACRO(__VA_ARGS__,SCOPE_2ARG,SCOPE_1ARG)(__VA_ARGS__)
#define SCOPE_1ARG(t_name) \
#define SCOPE_2ARG(t_name,p_name) \
#define CG_CONS_DECL(type, args...) \
#define CG_CONS_DEF(type, args...) \
#define CG_CONS(type, args...) \
#define CG_SCOPED_CONS_DECL(type, scp_type, args...) \
#define CG_SCOPED_CONS_DEF(type, scp_type, args...) \
#define CG_SCOPED_CONS(type, scp_type, args...) \
#define CG_SCOPED_INST(name, args...) \
#define SAMPLE_POINT(variable_name, cvp) variable_name = static_cast<decltype(variable_name)> \
#define CREATE_WRAP_F(expr, type) [&]() -> type { return (expr); }
#define GET_CVP_MACRO(_1,_2,_3,_4, NAME,...) NAME
#define COVERPOINT(...) GET_CVP_MACRO(__VA_ARGS__, CVP_4, CVP_3)(__VA_ARGS__)
#define CVP_3(type, cvp_name, sample_expr) \
#define CVP_4(type, cvp_name, sample_expr, sample_cond) \
#define UCIS_PRINTER_HPP

This means that we could get various naming conflicts. These should all be protected with a common prefix (likely FC4SC_).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant