We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We're using an older version of TANK than the current head, but it looks like the problem persists even now...
tank_client.h #includes Switch/switch.h, which #defines the following macro names:
tank_client.h
#include
Switch/switch.h
#define
#define require(x) assert(x) #define Drequire(x) assert(x) #define EXPECT(x) assert(x) #define DEXPECT(x) assert(x) ... #define sizeof_array(x) sizeof(detail::SIZEOF_ARRAY_REQUIRES_ARRAY_ARGUMENT(x)) #define STRLEN(p) (uint32_t)(sizeof(p) - 1) #define STRWITHLEN(p) (p), (uint32_t)(sizeof(p) - 1) #define LENWITHSTR(p) (uint32_t)(sizeof(p) - 1), (p) #define STRWLEN(p) STRWITHLEN(p) #define LENWSTR(p) LENWITHSTR(p) #define _S(p) STRWITHLEN(p) ... #define TOKEN_PASTE(x, y) x##y #define TOKEN_PASTE2(x, y) TOKEN_PASTE(x, y) #define DEFER(...) auto TOKEN_PASTE2(__deferred, __COUNTER__) = make_scope_guard([&] { __VA_ARGS__; });
But those are very common tokens/names, and will cause collisions with names by consuming user code, as well as other libraries.
For example boost/asio uses require() as a regular C++ function name.
boost/asio
require()
Since macro names are not namespaced, the usual thing to do is prefix them with library name. E.g., TANK_REQUIRE and TANK_EXPECT, etc.
TANK_REQUIRE
TANK_EXPECT
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We're using an older version of TANK than the current head, but it looks like the problem persists even now...
tank_client.h
#include
sSwitch/switch.h
, which#define
s the following macro names:But those are very common tokens/names, and will cause collisions with names by consuming user code, as well as other libraries.
For example
boost/asio
usesrequire()
as a regular C++ function name.Since macro names are not namespaced, the usual thing to do is prefix them with library name. E.g.,
TANK_REQUIRE
andTANK_EXPECT
, etc.The text was updated successfully, but these errors were encountered: