久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='aoxfo'></bdo><ul id='aoxfo'></ul>

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

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

        使用 static_assert 檢查傳遞給宏的類型

        Use static_assert to check types passed to macro(使用 static_assert 檢查傳遞給宏的類型)
          <tbody id='8cDhH'></tbody>

        <small id='8cDhH'></small><noframes id='8cDhH'>

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

            <bdo id='8cDhH'></bdo><ul id='8cDhH'></ul>

              <tfoot id='8cDhH'></tfoot>
            • <legend id='8cDhH'><style id='8cDhH'><dir id='8cDhH'><q id='8cDhH'></q></dir></style></legend>
                1. 本文介紹了使用 static_assert 檢查傳遞給宏的類型的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時送ChatGPT賬號..

                  不幸的是,我的庫的原始版本中遺留了幾個宏,它們使用了一些非常瘋狂的 C.特別是,我有一系列宏希望將某些類型傳遞給它們.是否可以按照以下方式進(jìn)行操作:

                  I unfortunately have several macros left over from the original version of my library that employed some pretty crazy C. In particular, I have a series of macros that expect certain types to be passed to them. Is it possible to do something along the lines of:

                  static_assert(decltype(retval) == bool);
                  

                  怎么辦?有什么聰明的選擇嗎?

                  是的,我知道宏很糟糕.我知道 C++ 不是 C,等等.

                  Yes I'm aware macros are bad. I'm aware C++ is not C, etc.

                  這是一些相關(guān)代碼,以及源文件.歡迎提出建議.原始問題保持不變.

                  Here is some related code, and the source file. Suggestions are welcome. The original question remains the same.

                  推薦答案

                  我發(fā)現(xiàn)這是最干凈的,使用@UncleBens 建議:

                  I found this to be the cleanest, using @UncleBens suggestion:

                  #include <type_traits>
                  
                  static_assert(std::is_same<decltype(retval), bool>::value, "retval must be bool");
                  

                  這篇關(guān)于使用 static_assert 檢查傳遞給宏的類型的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Why do two functions have the same address?(為什么兩個函數(shù)的地址相同?)
                  Why the initializer of std::function has to be CopyConstructible?(為什么 std::function 的初始化程序必須是可復(fù)制構(gòu)造的?)
                  mixing templates with polymorphism(混合模板與多態(tài)性)
                  When should I use the keyword quot;typenamequot; when using templates(我什么時候應(yīng)該使用關(guān)鍵字“typename?使用模板時)
                  Dependent name resolution amp; namespace std / Standard Library(依賴名稱解析命名空間 std/標(biāo)準(zhǔn)庫)
                  gcc can compile a variadic template while clang cannot(gcc 可以編譯可變參數(shù)模板,而 clang 不能)

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

                      <tfoot id='WjqQ1'></tfoot>
                        <i id='WjqQ1'><tr id='WjqQ1'><dt id='WjqQ1'><q id='WjqQ1'><span id='WjqQ1'><b id='WjqQ1'><form id='WjqQ1'><ins id='WjqQ1'></ins><ul id='WjqQ1'></ul><sub id='WjqQ1'></sub></form><legend id='WjqQ1'></legend><bdo id='WjqQ1'><pre id='WjqQ1'><center id='WjqQ1'></center></pre></bdo></b><th id='WjqQ1'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='WjqQ1'><tfoot id='WjqQ1'></tfoot><dl id='WjqQ1'><fieldset id='WjqQ1'></fieldset></dl></div>
                        • <bdo id='WjqQ1'></bdo><ul id='WjqQ1'></ul>
                          <legend id='WjqQ1'><style id='WjqQ1'><dir id='WjqQ1'><q id='WjqQ1'></q></dir></style></legend>
                            <tbody id='WjqQ1'></tbody>

                            主站蜘蛛池模板: 国产视频在线观看视频 | 日韩在线免费视频 | 亚州av在线 | 欧美视频区 | 国产黄网 | 一区二区不卡视频 | 色在线视频 | 国产福利视频在线观看 | 国产一级网站 | 日韩在线精品 | 欧美日本 | 亚洲精品三级 | 成人午夜免费视频 | 中文字幕在线一区二区三区 | 在线天堂视频 | 一级免费片 | 免费看黄色一级片 | 精品免费| 在线观看黄色av | 欧美日韩激情视频 | 成人三级视频在线观看 | 狠狠干在线 | 一区二区在线视频 | 影音先锋中文字幕在线 | 波多野吉衣一二三区乱码 | 伊人影院久久 | 国产一区精品在线观看 | 肉丝美脚视频一区二区 | 国产精品一区二 | 成人不卡| 婷婷综合激情 | 中文字幕一区二区三区视频 | 黄色在线免费网站 | www.草逼| 国产精品视频免费在线观看 | 欧美一级片免费 | 午夜免费av | 亚洲综合另类 | 一级片欧美 | 国产精品欧美激情 | 久久在线免费视频 |