P
przemyslaw.sliwa
Hi,
I just wanted to write a quick macro, which will wrap the following
code
#define EXCLUDE_WIN_WARNING(warning_id) \
#ifdef _MSC_VER \
#pragma warning(push) \
#pragma warning(disable, warning_id) \
#endif
#define RESTORE_WIN_WARNING \
#ifdef _MSC_VER \
#pragma warning(pop) \
#endif
This does not compile at all. The problem in this case is the # sign.
I would like to use it in the following way:
EXCLUDE_WIN_WARNING(3456)
#include <third_party_header.h>
RESTORE_WIN_WARNING
Can somone tell me how to tho this? It is probably something silly I
forget but I am having problems with compilation.
Thanks a lot for help,
Pshemek
I just wanted to write a quick macro, which will wrap the following
code
#define EXCLUDE_WIN_WARNING(warning_id) \
#ifdef _MSC_VER \
#pragma warning(push) \
#pragma warning(disable, warning_id) \
#endif
#define RESTORE_WIN_WARNING \
#ifdef _MSC_VER \
#pragma warning(pop) \
#endif
This does not compile at all. The problem in this case is the # sign.
I would like to use it in the following way:
EXCLUDE_WIN_WARNING(3456)
#include <third_party_header.h>
RESTORE_WIN_WARNING
Can somone tell me how to tho this? It is probably something silly I
forget but I am having problems with compilation.
Thanks a lot for help,
Pshemek