为 LONGLONG 类型分配默认值。 Mingw GCC
Assigning a default value to a LONGLONG type. Mingw GCC
我正在移植一些代码并遇到了这个
class Someclass
{
void Restart (IN TIMEX_STAMP rtMinTime = 0I64);
};
此代码在 visual studio 中运行良好,但在 Mingw GCC 中出现错误
error: expected ')' before ';' token|
error: unable to find numeric literal operator 'operator"" I64'|
关于如何修复此代码的任何建议?
文字后缀 I64
是 Visual C++ extension that specifies a 64-bit signed integer type. 0LL
is probably close enough in standard C++, although long long
is technically specified to have at least 64 bits. If you're paranoid, there's always std::int64_t{0}
.
我正在移植一些代码并遇到了这个
class Someclass
{
void Restart (IN TIMEX_STAMP rtMinTime = 0I64);
};
此代码在 visual studio 中运行良好,但在 Mingw GCC 中出现错误
error: expected ')' before ';' token|
error: unable to find numeric literal operator 'operator"" I64'|
关于如何修复此代码的任何建议?
文字后缀 I64
是 Visual C++ extension that specifies a 64-bit signed integer type. 0LL
is probably close enough in standard C++, although long long
is technically specified to have at least 64 bits. If you're paranoid, there's always std::int64_t{0}
.