{"id":163,"date":"2023-05-31T19:33:47","date_gmt":"2023-05-31T11:33:47","guid":{"rendered":"https:\/\/boostup.cf\/?p=163"},"modified":"2023-06-14T19:28:44","modified_gmt":"2023-06-14T11:28:44","slug":"%e8%8b%b1%e6%96%87%e8%af%8d%e6%b1%87","status":"publish","type":"post","link":"https:\/\/189505.xyz\/?p=163","title":{"rendered":"\u82f1\u6587\u8bcd\u6c47"},"content":{"rendered":"<p>Just thinking about it probably increases the risk of carpal tunnel syndrome.<\/p>\n<p>\u4e00\u60f3\u5230\u5b83\u53ef\u80fd\u4f1a\u589e\u52a0\u60a3\u8155\u7ba1\u7efc\u5408\u5f81\u7684\u98ce\u9669<\/p>\n<pre>\ncarpal tunnel syndrome\n\u82f1\n\/\u02cck\u0251\u02d0pl \u02c8t\u028cnl s\u026andr\u0259\u028am\/\n\n\u7f8e\n\/\u02cck\u0251\u02d0rpl \u02c8t\u028cnl s\u026andro\u028am\/\n\nn.\n\u8155\u7ba1\u7efc\u5408\u5f81(\u624b\u8155\u957f\u671f\u53d7\u529b\u538b\u8feb\u795e\u7ecf\u5f15\u8d77\u624b\u548c\u624b\u6307\u75bc\u75db)\n<\/pre>\n<p>Avoiding such medical tragedies is easy.<br \/>\u907f\u514d\u8fd9\u6837\u7684\u533b\u7597\u60b2\u5267\u5f88\u5bb9\u6613\u3002<\/p>\n<p>neither form is particularly easy to choke down<br \/>\u4e24\u79cd\u5f62\u5f0f\u90fd\u4e0d\u662f\u7279\u522b\u5bb9\u6613\u7a92\u606f<\/p>\n<p>this is hardly a compelling reason to choose alias declarations over typedefs.<\/p>\n<pre>\ncompelling\n\u82f1\n\/k\u0259m\u02c8pel\u026a\u014b\/\n\u7f8e\n\/k\u0259m\u02c8pel\u026a\u014b\/ \nadj.\n\u5f15\u4eba\u5165\u80dc\u7684;\u6263\u4eba\u5fc3\u5f26\u7684;\u975e\u5e38\u5f3a\u70c8\u7684;\u4e0d\u53ef\u6297\u62d2\u7684;\u4ee4\u4eba\u4fe1\u670d\u7684\nv.\n\u5f3a\u8feb;\u8feb\u4f7f;\u4f7f\u5fc5\u987b;\u5f15\u8d77(\u53cd\u5e94)\n<\/pre>\n<p>\nyou need to be familiar with at least the basics of this facet of C++ language<br \/>\n\u60a8\u81f3\u5c11\u9700\u8981\u719f\u6089c++\u8bed\u8a00\u8fd9\u4e00\u65b9\u9762\u7684\u57fa\u672c\u77e5\u8bc6\n<\/p>\n<pre>\nfacet\n\u82f1\n\/\u02c8f\u00e6s\u026at\/\n\n\u7f8e\n\/\u02c8f\u00e6s\u026at\/\n\nn.\n\u65b9\u9762;(\u4e8b\u7269\u7684)\u90e8\u5206;(\u5b9d\u77f3\u7684)\u5c0f\u5e73\u9762;\u7422\u9762\n<\/pre>\n<p>\nIt can also help you gauge the ramifications if you\u2019re contemplating changing the signature of a virtual function in a base class. <br \/>\n\u5982\u679c\u60a8\u6b63\u5728\u8003\u8651\u66f4\u6539\u57fa\u7c7b\u4e2d\u865a\u62df\u51fd\u6570\u7684\u7b7e\u540d\uff0c\u5b83\u8fd8\u53ef\u4ee5\u5e2e\u52a9\u60a8\u8bc4\u4f30\u540e\u679c\u3002\n<\/p>\n<pre>\ngauge\n\u82f1\n\/\u0261e\u026ad\u0292\/\n\n\u7f8e\n\/\u0261e\u026ad\u0292\/\n\nvt.\n(\u7528\u4eea\u5668)\u6d4b\u91cf;\u5224\u5b9a\uff0c\u5224\u65ad(\u5c24\u6307\u4eba\u7684\u611f\u60c5\u6216\u6001\u5ea6);\u4f30\u8ba1;\u4f30\u7b97\nn.\n\u539a\u5ea6;\u6d4b\u91cf\u4eea\u5668(\u6216\u4eea\u8868);\u8ba1\u91cf\u5668;\u5bbd\u5ea6;(\u67aa\u7ba1\u7684)\u53e3\u5f84;\uff08\u94c1\u9053\u7684\uff09\u8f68\u8ddd;\u4e8b\u5b9e\uff0c\u4f9d\u636e\uff0c\u5c3a\u5ea6\uff0c\u6807\u51c6\n\nramifications\n\u82f1\n\/\u02ccr\u00e6m\u026af\u026a\u02c8ke\u026a\u0283\u0259nz\/\n\n\u7f8e\n\/\u02ccr\u00e6m\u0259f\u0259\u02c8ke\u026a\u0283\u0259nz\/\n\nn.\n(\u4f17\u591a\u590d\u6742\u800c\u53c8\u96be\u4ee5\u9884\u6599\u7684)\u7ed3\u679c\uff0c\u540e\u679c\nramification\u7684\u590d\u6570\n\ncontemplating\n\u82f1\n\/\u02c8k\u0252nt\u0259mple\u026at\u026a\u014b\/\n\n\u7f8e\n\/\u02c8k\u0251\u02d0nt\u0259mple\u026at\u026a\u014b\/\n\nv.\n\u8003\u8651;\u601d\u91cf;\u601d\u5fd6;\u8003\u8651\u63a5\u53d7(\u53d1\u751f\u67d0\u4e8b\u7684\u53ef\u80fd\u6027);\u6df1\u601d\u719f\u8651;\u6c89\u601d;\u82e6\u601d\u51a5\u60f3\ncontemplate\u7684\u73b0\u5728\u5206\u8bcd\n<\/pre>\n<p>\nThis maybe-or-never dichotomy forms the basis of C++11\u2019s exception specifications,<br \/>\nwhich essentially replace C++98\u2019s.<br \/>\n\u8fd9\u79cd\u53ef\u80fd\u4f1a\u4e5f\u53ef\u80fd\u6c38\u8fdc\u4e0d\u4f1a\u7684\u4e8c\u5206\u6cd5\u6784\u6210\u4e86C++11\u7684\u5f02\u5e38\u89c4\u8303\u7684\u57fa\u7840\uff0c\u5b83\u57fa\u672c\u4e0a\u53d6\u4ee3\u4e86C++98\u7684\u5f02\u5e38\u89c4\u8303\u3002\n<\/p>\n<pre>\ndichotomy\n\u82f1\n\/da\u026a\u02c8k\u0252t\u0259mi\/\n\n\u7f8e\n\/da\u026a\u02c8k\u0251\u02d0t\u0259mi\/\n\nn.\n\u4e00\u5206\u4e3a\u4e8c;\u4e8c\u5206\u6cd5\n<\/pre>\n<p>\nBut there\u2019s an additional incentive to apply noexcept to functions that won\u2019t produce exceptions: it permits compilers to generate better object code.<br \/>\n<br \/>\n\u4f46\u662f\uff0c\u5c06noexcept\u5e94\u7528\u4e8e\u4e0d\u4f1a\u4ea7\u751f\u5f02\u5e38\u7684\u51fd\u6570\u8fd8\u6709\u4e00\u4e2a\u989d\u5916\u7684\u52a8\u673a\uff1a\u5b83\u5141\u8bb8\u7f16\u8bd1\u5668\u751f\u6210\u66f4\u597d\u7684\u5bf9\u8c61\u4ee3\u7801\u3002\n<\/p>\n<pre>\nincentive\n\u82f1\n\/\u026an\u02c8sent\u026av\/\n\n\u7f8e\n\/\u026an\u02c8sent\u026av\/\n\nn.\n\u6fc0\u52b1\uff0c\u9f13\u52b1\uff0c\u5956\u52b1;\u523a\u6fc0;\u8bf1\u56e0\uff0c\u52a8\u673a\nadj.\n\u523a\u6fc0\uff08\u6027\uff09\u7684;\u9f13\u52b1\uff08\u6027\uff09\u7684; \u5956\u52b1\uff08\u6027\uff09\u7684<\/pre>\n<p>\nWhen applied to objects, it\u2019s essentially a beefed-up form of const,<br \/>\n<br \/>\n\u5f53\u5e94\u7528\u4e8e\u5bf9\u8c61\u65f6\uff0c\u5b83\u672c\u8d28\u4e0a\u662fconst\u7684\u4e00\u79cd\u589e\u5f3a\u5f62\u5f0f\uff0c<\/p>\n<pre>\nbeefed-up\n\u82f1\n\/bi\u02d0ft \u028cp\/\n\n\u7f8e\n\/bi\u02d0ft \u028cp\/\n\nadj.\n\u52a0\u5f3a\u7684;\u5145\u5b9e\u7684<\/pre>\n<p>\nThe concept is only part of the story, though, because when con<br \/>\nstexpr is applied to functions, things are more nuanced than this suggests. <br \/>\n\u7136\u800c\uff0c\u8fd9\u4e2a\u6982\u5ff5\u53ea\u662f\u6545\u4e8b\u7684\u4e00\u90e8\u5206\uff0c\u56e0\u4e3a\u5f53constexpr\u5e94\u7528\u4e8e\u51fd\u6570\u65f6\uff0c\u4e8b\u60c5\u6bd4\u8fd9\u6697\u793a\u7684\u66f4\u5fae\u5999\u3002\n<\/p>\n<p><ore>nuanced<br \/>\nnuanced<br \/>\nadj.<br \/>\n\u7ec6\u81f4\u5165\u5fae\u7684;\u6709\u7ec6\u5fae\u5dee\u522b\u7684<\/ore><\/p>\n<p>\nLest I ruin the surprise ending, for now I\u2019ll just say that you can\u2019t assume that the results of constexpr functions are const, nor can you take for granted that their values are known during compilation.<br \/>\n\u4e3a\u4e86\u907f\u514d\u7834\u574f\u610f\u5916\u7684\u7ed3\u5c40\uff0c\u73b0\u5728\u6211\u53ea\u60f3\u8bf4\uff0c\u4f60\u4e0d\u80fd\u5047\u8bbeconstexpr\u51fd\u6570\u7684\u7ed3\u679c\u662fconst\uff0c\u4e5f\u4e0d\u80fd\u60f3\u5f53\u7136\u5730\u8ba4\u4e3a\u5b83\u4eec\u7684\u503c\u5728\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u662f\u5df2\u77e5\u7684\u3002\n<\/p>\n<pre>Lest\n\u82f1\n\/lest\/  \n\u7f8e\n\/lest\/ \n\u514d\u5f97;\u751f\u6015;\u552f\u6050, \u4ee5\u514d;\u60df\u6050,\u514d\u5f97<\/pre>\n<p>\nPerhaps most intriguingly, these things are features. It\u2019s good that constexpr functions need not produce results that are const or known during compilation!<br \/>\n<br \/>\n\u4e5f\u8bb8\u6700\u6709\u8da3\u7684\u662f\uff0c\u8fd9\u4e9b\u4e1c\u897f\u90fd\u662f\u7279\u6027\u3002constexpr\u51fd\u6570\u5728\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u4e0d\u9700\u8981\u751f\u6210const\u6216\u5df2\u77e5\u7684\u7ed3\u679c\uff0c\u8fd9\u5f88\u597d\uff01\n<\/p>\n<pre>\nintriguing\nintriguing\n\u82f1\n\/\u026an\u02c8tri\u02d0\u0261\u026a\u014b\/\n\n\u7f8e\n\/\u026an\u02c8tri\u02d0\u0261\u026a\u014b\/\n\nadj.\n\u6709\u8da3\u7684;\u5f15\u4eba\u5165\u80dc\u7684;\u795e\u79d8\u7684\nv.\n\u6fc0\u8d77\u2026\u7684\u5174\u8da3;\u5f15\u53d1\u2026\u7684\u597d\u5947\u5fc3;\u79d8\u5bc6\u7b56\u5212(\u52a0\u5bb3\u4ed6\u4eba);\u5bc6\u8c0b\nintrigue\u7684\u73b0\u5728\u5206\u8bcd\n<\/pre>\n<p>\nIn official C++ parlance, the special member functions are the ones that C++ is willing to generate on its own. <br \/>\n\u7528C++\u7684\u5b98\u65b9\u8bf4\u6cd5\uff0c\u7279\u6b8a\u6210\u5458\u51fd\u6570\u662fC++\u613f\u610f\u81ea\u5df1\u751f\u6210\u7684\u51fd\u6570\u3002\n<\/p>\n<pre>\nparlance\n\u82f1\n\/\u02c8p\u0251\u02d0l\u0259ns\/\n\n\u7f8e\n\/\u02c8p\u0251\u02d0rl\u0259ns\/\n\nn.\n\u7528\u8bed;\u8bf4\u6cd5;\u672f\u8bed<\/pre>\n<p>\nAssuming you store the result of the makeInvestment call in an auto variable, you frolic in blissful ignorance of the fact that the resource you\u2019re using requires special treatment during deletion. <br \/>\n\u5047\u8bbe\u60a8\u5c06makeInvestment\u8c03\u7528\u7684\u7ed3\u679c\u5b58\u50a8\u5728\u4e00\u4e2a\u81ea\u52a8\u53d8\u91cf\u4e2d\uff0c\u90a3\u4e48\u60a8\u5c31\u53ef\u4ee5\u65e0\u5fe7\u65e0\u8651\u5730\u5b09\u620f\uff0c\u800c\u4e0d\u77e5\u9053\u60a8\u6b63\u5728\u4f7f\u7528\u7684\u8d44\u6e90\u5728\u5220\u9664\u8fc7\u7a0b\u4e2d\u9700\u8981\u7279\u6b8a\u5904\u7406\u3002\n<\/p>\n<pre>\nfrolic\n\u82f1\n\/\u02c8fr\u0252l\u026ak\/\n\n\u7f8e\n\/\u02c8fr\u0251\u02d0l\u026ak\/\n\nvi.\n\u5b09\u620f;\u5b09\u95f9\nn.\n\u6b22\u4e50\u7684\u6d3b\u52a8\nv.\n\u5b09\u620f;\u5b09\u95f9\nadj.\n\u5feb\u4e50\u7684\n\nblissful\n\u82f1\n\/\u02c8bl\u026asfl\/\n\n\u7f8e\n\/\u02c8bl\u026asfl\/\n\nadj.\n\u5e78\u798f\u7684;\u6781\u4e50\u7684\n\n <\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Just thinking about it probably increases the risk of c &#8230; <a title=\"\u82f1\u6587\u8bcd\u6c47\" class=\"read-more\" href=\"https:\/\/189505.xyz\/?p=163\" aria-label=\"More on \u82f1\u6587\u8bcd\u6c47\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"_links":{"self":[{"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/posts\/163"}],"collection":[{"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/189505.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=163"}],"version-history":[{"count":18,"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/posts\/163\/revisions"}],"predecessor-version":[{"id":182,"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/posts\/163\/revisions\/182"}],"wp:attachment":[{"href":"https:\/\/189505.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/189505.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/189505.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}