<bdo id='nLnwq'></bdo><ul id='nLnwq'></ul>

    1. <small id='nLnwq'></small><noframes id='nLnwq'>

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

    4. <tfoot id='nLnwq'></tfoot>

      在 C++ Boost 库中,为什么有一个“.ipp"?一些头文件的扩展名

      In the C++ Boost libraries, why is there a quot;.ippquot; extension on some header files(在 C++ Boost 库中,为什么有一个“.ipp?一些头文件的扩展名)

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

                <tbody id='xSRQt'></tbody>
              • <tfoot id='xSRQt'></tfoot>

                <legend id='xSRQt'><style id='xSRQt'><dir id='xSRQt'><q id='xSRQt'></q></dir></style></legend>
              • <small id='xSRQt'></small><noframes id='xSRQt'>

              • 本文介绍了在 C++ Boost 库中,为什么有一个“.ipp"?一些头文件的扩展名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                在 C++ Boost 库中,为什么某些头文件上有.ipp"扩展名?

                In the C++ Boost libraries, why is there a ".ipp" extension on some header files?

                它们似乎是包含在同名.hpp"文件中的头文件.

                It seems like they are header files included by the ".hpp" file of the same name.

                这个约定在 Boost 之外很常见吗?

                Is this convention common outside of Boost?

                拥有特殊文件类型的理由是什么?

                What is the justification for having a special file type?

                推荐答案

                来自一位模板大师的解释:

                如果您想将模板源拆分为界面和实施(有很多很好的理由这样做,包括控制实例化),你不能很好地使用相同的名称(foo.hpp) 两次,foo.cpp 不适合任何一个.foo.ipp 清楚地将该文件描述为一个实现文件,旨在#included 在 foo.hpp 中.

                If you want to split up your template sources into interface and implementation (there are lots of good reasons to do that, including controlling instantiation), you can't very well use the same name (foo.hpp) twice, and foo.cpp wouldn't be appropriate for either one. foo.ipp clearly delineates the file as an implementation file intended to be #included in foo.hpp.

                这篇关于在 C++ Boost 库中,为什么有一个“.ipp"?一些头文件的扩展名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                How to limit the number of running instances in C++(C++中如何限制运行实例的数量)
                Using boost::asio::async_read with stdin?(将 boost::asio::async_read 与 stdin 一起使用?)
                How to find out what dependencies (i.e other Boost libraries) a particular Boost library requires?(如何找出特定 Boost 库需要哪些依赖项(即其他 Boost 库)?)
                What#39;s the purpose of a leading quot;::quot; in a C++ method call(引导“::的目的是什么?在 C++ 方法调用中)
                Boost Spirit x3: parse into structs(Boost Spirit x3:解析为结构体)
                How boost auto-linking makes choice?(boost自动链接如何做出选择?)
                <legend id='FfKbg'><style id='FfKbg'><dir id='FfKbg'><q id='FfKbg'></q></dir></style></legend>

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

                        <bdo id='FfKbg'></bdo><ul id='FfKbg'></ul>