{"id":1518,"date":"2020-03-29T22:18:40","date_gmt":"2020-03-29T14:18:40","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=1518"},"modified":"2020-09-27T19:58:14","modified_gmt":"2020-09-27T11:58:14","slug":"cexplicit%e5%92%8cimplicit","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=1518","title":{"rendered":"[c++]explicit\u548cimplicit"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>explicit \u9632\u6b62\u7c7b\u6784\u9020\u51fd\u6570\u9690\u5f0f\u81ea\u52a8\u8f6c\u6362\n\nclass CString\n{\n    CString(int size); \/\/ \u6ca1\u6709\u4f7f\u7528explicit\uff0c\u5373\u9ed8\u8ba4\u4e3aimplicit\n}\nCString str(100); \/\/ \u5408\u6cd5\nCString str = 10; \/\/ \u5408\u6cd5\n\nclass CString\n{\n    explicit CString(int size);\n}\nCString str(100); \/\/ \u5408\u6cd5\nCString str = 10; \/\/ \u975e\u6cd5\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[20],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1518"}],"collection":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1518"}],"version-history":[{"count":1,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1518\/revisions"}],"predecessor-version":[{"id":1519,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1518\/revisions\/1519"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}