IOS XIOBASE与XOLCUM问题求助:自定义internal宏冲突排查
贪吃蛇开发中iOS平台XIOBASE相关编译问题排查求助
我开发贪吃蛇游戏时,在utils文件中写了以下代码:
typedef char s8; typedef unsigned char u8; typedef short s16; typedef unsigned short u16; typedef int s32; typedef unsigned int u32; typedef long long s64; typedef unsigned long long u64; #define global_variable static #define internal static inline int clamp(int min, int val, int max) { if (val < min) return min; if (val > max) return max; return val; }
目前在iOS平台遇到了XIOBASE和XOLCUM相关的编译问题,我怀疑是internal宏引发的命名冲突,但移除该宏直接替换为static后,问题仍然存在。
以下是XIOBASE中的相关代码片段:
template <class _Dummy> class _Iosb { // define templatized bitmask/enumerated types, instantiate on demand public: enum _Fmtflags { // constants for formatting options _Fmtmask = 0xffff, _Fmtzero = 0 }; static constexpr int skipws = 0x0001; static constexpr int unitbuf = 0x0002; static constexpr int uppercase = 0x0004; static constexpr int showbase = 0x0008; static constexpr int showpoint = 0x0010; static constexpr int showpos = 0x0020; static constexpr int left = 0x0040; static constexpr int right = 0x0080; static constexpr int internal = 0x0100; static constexpr int dec = 0x0200; static constexpr int oct = 0x0400; static constexpr int hex = 0x0800; static constexpr int scientific = 0x1000; static constexpr int fixed = 0x2000; static constexpr int hexfloat = 0x3000; // TRANSITION, ABI, GH-3296 static constexpr int boolalpha = 0x4000; static constexpr int adjustfield = left | right | internal; static constexpr int basefield = dec | oct | hex; static constexpr int floatfield = scientific | fixed;
内容的提问来源于stack exchange,提问作者1fabian4
相关产品推荐
相关产品推荐

