Meh*_*dad 13 c++ syntax boost c-preprocessor boost-preprocessor
我的(相对较旧的)C++编译器在Boost中对此文件进行了阻塞,起始时间为:
# /* Copyright (C) 2001
# * Housemarque Oy
# * http://www.housemarque.com
# *
# * Distributed under the Boost Software License, Version 1.0. (See
# * accompanying file LICENSE_1_0.txt or copy at
# * http://www.boost.org/LICENSE_1_0.txt)
# */
#
Run Code Online (Sandbox Code Playgroud)
这真的是合法的C++吗?预处理器令牌的语法规则是什么?
ybu*_*ill 22
是的,#标准§16[cpp]明确允许仅包含和空格的行:
control-line:
# includepp-tokens new-line
# defineidentifier replacement-list new-line
# defineidentifier lparen identifier-list opt)replacement-list new-line
# defineidentifier lparen... )replacement-list new-line
# defineidentifier lparen identifier-list, ... )replacement-list new-line
# undefidentifier new -line
# linepp-tokens新线
# errorpp-tokens 选择新线
# pragmapp-tokens 选择新线
#新线
请注意,注释将在转换阶段3(即预处理器之前)由空格替换.
| 归档时间: |
|
| 查看次数: |
349 次 |
| 最近记录: |