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

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

<tfoot id='rlxOX'></tfoot>

<legend id='rlxOX'><style id='rlxOX'><dir id='rlxOX'><q id='rlxOX'></q></dir></style></legend>

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

      1. 引用类型的 std::optional 特化

        时间:2024-05-11

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

          1. <legend id='PJLBh'><style id='PJLBh'><dir id='PJLBh'><q id='PJLBh'></q></dir></style></legend>
            <tfoot id='PJLBh'></tfoot>

                • <bdo id='PJLBh'></bdo><ul id='PJLBh'></ul>
                  <i id='PJLBh'><tr id='PJLBh'><dt id='PJLBh'><q id='PJLBh'><span id='PJLBh'><b id='PJLBh'><form id='PJLBh'><ins id='PJLBh'></ins><ul id='PJLBh'></ul><sub id='PJLBh'></sub></form><legend id='PJLBh'></legend><bdo id='PJLBh'><pre id='PJLBh'><center id='PJLBh'></center></pre></bdo></b><th id='PJLBh'></th></span></q></dt></tr></i><div id='PJLBh'><tfoot id='PJLBh'></tfoot><dl id='PJLBh'><fieldset id='PJLBh'></fieldset></dl></div>
                    <tbody id='PJLBh'></tbody>
                  本文介绍了引用类型的 std::optional 特化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  为什么std::optional(目前libc++中的std::experimental::optional)没有引用类型的特化(与 boost::optional 相比)?

                  Why std::optional (std::experimental::optional in libc++ at the moment) does not have specialization for reference types (compared with boost::optional)?

                  我认为这将是非常有用的选择.

                  I think it would be very useful option.

                  STL中是否有一些对象引用可能已经存在的对象语义?

                  Is there some object with reference to maybe already existing object semantics in STL?

                  推荐答案

                  When n3406(提案的第 2 修订版)进行了讨论,一些委员会成员对可选的参考资料感到不舒服.在 n3527 (修订版 #3),作者决定将可选引用作为辅助建议,以增加获得批准的可选值并将其放入 C++14 的机会.虽然由于其他各种原因,可选没有完全进入 C++14,但委员会并没有拒绝可选引用,并且如果有人提出它,将来可以自由添加可选引用.

                  When n3406 (revision #2 of the proposal) was discussed, some committee members were uncomfortable with optional references. In n3527 (revision #3), the authors decided to make optional references an auxiliary proposal, to increase the chances of getting optional values approved and put into what became C++14. While optional didn't quite make it into C++14 for various other reasons, the committee did not reject optional references and is free to add optional references in the future should someone propose it.

                  这篇关于引用类型的 std::optional 特化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:C++ 中是否有标准的日期/时间类? 下一篇:Fortran 中的 STL 模拟

                  相关文章

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

                  <tfoot id='Uvfxg'></tfoot>
                  • <bdo id='Uvfxg'></bdo><ul id='Uvfxg'></ul>
                  <legend id='Uvfxg'><style id='Uvfxg'><dir id='Uvfxg'><q id='Uvfxg'></q></dir></style></legend>