Closed enginmanap closed 4 years ago
Same for __attribute((unused))
So it should be disabled by a macro if it is a Visual Studio build ? For example:
#ifdef _MSC_VER
#define TAG
#else
#define TAG __attribute__((unused))
#endif
Actually, attribute was a gcc extension, but now it is part of the C++ standart. C++14 doesn't have unused defined, but the standart allows implementations define their own. So all instances of the old version should be replaced with this: [[gnu::unused]]
Would not [[gnu::unused]] be a problem for Visual Studio?
No, the standart says unknown extensions should be ignored.
Ok then, I will replace them
It should be replaced by a macro