![](/img/trans.png)
[英]Is the GNU C++ compiler ((GCC) 5.2.0) good at “inlining” by itself?
[英]C++ GNU GCC with #define out & colliding
我正在使用Code::Blocks
和C++ GNU GCC
并尝试将Visual Studio Project
移植到GNU GCC
。
当我尝试编译时,我陷入了Defines.h
文件中的define宏:
#define out &
并且在编译时出现此错误:
error: expected unqualified-id before '=' token
在这行上:
// Open for output. Default for @c ofstream and fstream.
static const openmode out = _S_out;
在ios_base.h中
据我所知,该文件是libstd
库的一部分。 我可以禁用它吗? 如果是这样,我该怎么做?
我的库不需要任何std c++
,只需要c
库。
有两个主要选项:
out
来定义宏。 但严重的是,宏名为out
变成&
是一个很可怕的宏。 这将使很难快速理解代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.