• <i id='kW2z4'><tr id='kW2z4'><dt id='kW2z4'><q id='kW2z4'><span id='kW2z4'><b id='kW2z4'><form id='kW2z4'><ins id='kW2z4'></ins><ul id='kW2z4'></ul><sub id='kW2z4'></sub></form><legend id='kW2z4'></legend><bdo id='kW2z4'><pre id='kW2z4'><center id='kW2z4'></center></pre></bdo></b><th id='kW2z4'></th></span></q></dt></tr></i><div id='kW2z4'><tfoot id='kW2z4'></tfoot><dl id='kW2z4'><fieldset id='kW2z4'></fieldset></dl></div>

  • <small id='kW2z4'></small><noframes id='kW2z4'>

        <bdo id='kW2z4'></bdo><ul id='kW2z4'></ul>
      <tfoot id='kW2z4'></tfoot>
    1. <legend id='kW2z4'><style id='kW2z4'><dir id='kW2z4'><q id='kW2z4'></q></dir></style></legend>

        标头包含的嵌套深度是否有限制?

        Are there limits to how deep nesting of header inclusion can go?(标头包含的嵌套深度是否有限制?)

            <bdo id='CIXRZ'></bdo><ul id='CIXRZ'></ul>
              <legend id='CIXRZ'><style id='CIXRZ'><dir id='CIXRZ'><q id='CIXRZ'></q></dir></style></legend>

              <small id='CIXRZ'></small><noframes id='CIXRZ'>

                <tbody id='CIXRZ'></tbody>
              <i id='CIXRZ'><tr id='CIXRZ'><dt id='CIXRZ'><q id='CIXRZ'><span id='CIXRZ'><b id='CIXRZ'><form id='CIXRZ'><ins id='CIXRZ'></ins><ul id='CIXRZ'></ul><sub id='CIXRZ'></sub></form><legend id='CIXRZ'></legend><bdo id='CIXRZ'><pre id='CIXRZ'><center id='CIXRZ'></center></pre></bdo></b><th id='CIXRZ'></th></span></q></dt></tr></i><div id='CIXRZ'><tfoot id='CIXRZ'></tfoot><dl id='CIXRZ'><fieldset id='CIXRZ'></fieldset></dl></div>
                <tfoot id='CIXRZ'></tfoot>

                  本文介绍了标头包含的嵌套深度是否有限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在 MSDN 或其他地方找不到任何内容,但是是否有硬编码限制标头包含的嵌套深度?示例:

                  I can't find anything on MSDN or elsewhere, but are there hard-coded limits to how deep nesting of header inclusion can go? Example:

                  // H1.h
                  // guards etc.
                  #include "H2.h"
                  
                  // H2.h
                  // guards etc.
                  #include "H3.h"
                  
                  //...
                  
                  // HN.h <---- how large can N get??
                  

                  我想知道标准中是否有关于此的任何内容.如果答案是实现定义,那么我主要对 Visual Studio 工具链感兴趣.

                  I wonder if there is anything in the Standard about this. If the answer is implementation defined, then I'm primarily interested in the Visual Studio toolchain.

                  推荐答案

                  标准也有说明(在关于实现数量的部分,附件 B):

                  The standard also says something about it (in the part about implementation quantities, annex B):

                  限制可能会限制数量,包括以下描述的数量或其他.建议在每个数量后面加上括号内的数字作为该数量的最小值.然而,这些数量只是指导方针,而不是确定合规性.

                  The limits may constrain quantities that include those described below or others. The bracketed number following each quantity is recommended as the minimum for that quantity. However, these quantities are only guidelines and do not determine compliance.

                  ...

                  • #include 文件的嵌套级别 [256].

                  请注意,这只是推荐的最小值,因此编译器可能不支持那么多包含(但大多数编译器都支持,如其他答案所示).

                  Note that this is only a recommended minimum, so a compiler may not support that many inclusions (but most compilers do, as shown in other answers).

                  这篇关于标头包含的嵌套深度是否有限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Unable to access non-const member functions of objects in C++ std::set(无法访问 C++ std::set 中对象的非常量成员函数)
                  How should a size-limited stl-like container be implemented?(应该如何实现大小受限的 stl 类容器?)
                  Constructing std::function argument from lambda(从 lambda 构造 std::function 参数)
                  STL BigInt class implementation(STL BigInt 类实现)
                  Sync is unreliable using std::atomic and std::condition_variable(使用 std::atomic 和 std::condition_variable 同步不可靠)
                  Move list element to the end in STL(在 STL 中将列表元素移动到末尾)
                    <tbody id='1JJ2C'></tbody>
                    <bdo id='1JJ2C'></bdo><ul id='1JJ2C'></ul>

                      <i id='1JJ2C'><tr id='1JJ2C'><dt id='1JJ2C'><q id='1JJ2C'><span id='1JJ2C'><b id='1JJ2C'><form id='1JJ2C'><ins id='1JJ2C'></ins><ul id='1JJ2C'></ul><sub id='1JJ2C'></sub></form><legend id='1JJ2C'></legend><bdo id='1JJ2C'><pre id='1JJ2C'><center id='1JJ2C'></center></pre></bdo></b><th id='1JJ2C'></th></span></q></dt></tr></i><div id='1JJ2C'><tfoot id='1JJ2C'></tfoot><dl id='1JJ2C'><fieldset id='1JJ2C'></fieldset></dl></div>
                    1. <legend id='1JJ2C'><style id='1JJ2C'><dir id='1JJ2C'><q id='1JJ2C'></q></dir></style></legend>

                          <tfoot id='1JJ2C'></tfoot>
                          • <small id='1JJ2C'></small><noframes id='1JJ2C'>