{"id":170,"date":"2017-05-14T23:34:34","date_gmt":"2017-05-14T15:34:34","guid":{"rendered":"http:\/\/zsaber.com\/blog\/?p=170"},"modified":"2019-08-26T15:51:12","modified_gmt":"2019-08-26T07:51:12","slug":"c-%e6%80%a7%e8%83%bd%e4%bc%98%e5%8c%96%e9%82%a3%e4%ba%9b%e4%ba%8b%e5%84%bf","status":"publish","type":"post","link":"http:\/\/zsaber.com\/blog\/p\/170","title":{"rendered":"C++ \u6027\u80fd\u4f18\u5316\u90a3\u4e9b\u4e8b\u513f"},"content":{"rendered":"<p>\u6700\u8fd1\u5728\u6298\u817e\u4e00\u4e9b\u6027\u80fd\u4f18\u5316\u7684\u4e8b\u513f, \u987a\u4fbf\u8bb0\u5f55\u4e00\u4e0b<\/p>\n<p>\u5f53\u7136, \u70c2\u5927\u8857\u7684\u6284\u6765\u6284\u53bb\u6700\u6ca1\u610f\u601d\u4e86, \u8fd9\u91cc\u4e00\u5982\u65e2\u5f80\u7684\u5217\u4e00\u4e9b\u4e0d\u5e38\u89c1\u7684\u72b6\u51b5<\/p>\n<h1>\u5206\u652f\u9884\u6d4b<\/h1>\n<p>\u8fd9\u4e2a\u5176\u5b9e\u662f\u4e2a\u633a\u6709\u610f\u601d\u7684\u8bdd\u9898, \u8fd9\u91cc\u4e0d\u7ec6\u8bb2, \u6709\u5174\u8da3\u8bf7\u5148\u81ea\u884c\u641c\u7d22 &quot;\u5206\u652f\u9884\u6d4b&quot; \u5b66\u4e60\u4e00\u4e0b<\/p>\n<p>\u5178\u578b\u793a\u4f8b\u662f: \u5bf9\u4e00\u4e2a\u5df2\u6392\u5e8f\u7684\u6570\u7ec4\u505a if else \u904d\u5386, \u660e\u663e\u5feb\u4e8e\u4e00\u4e2a\u672a\u6392\u5e8f\u7684\u6570\u7ec4<\/p>\n<p>\u4e0d\u8fc7\u901a\u5e38\u6bd4\u8f83\u5c11\u9047\u5230\u4e0a\u8ff0\u60c5\u5f62, \u8fd9\u8fb9\u5217\u4e00\u4e2a\u7ecf\u5e38\u80fd\u78b0\u5230\u7684\u7ec6\u8282:<\/p>\n<pre><code class=\"language-cpp\">\/\/ \u793a\u4f8b1\nT func() {\n    if(cond) {\n        return a;\n    }\n    return b;\n}\n\n\/\/ \u793a\u4f8b2\nT func() {\n    if(cond) {\n        return a;\n    }\n    else {\n        return b;\n    }\n}<\/code><\/pre>\n<p>\u901a\u5e38\u60c5\u51b5\u4e0b, \u793a\u4f8b2 \u6bd4\u793a\u4f8b1 \u8981\u5feb (\u5927\u7ea6 5%~10%),<br \/>\n\u56e0\u4e3a\u5982\u679c\u4e0d\u5728 else \u4e2d, <code>return b;<\/code> \u5c06\u4f5c\u4e3a\u72ec\u7acb\u8bed\u53e5, \u4e0d\u53c2\u4e0e\u5206\u652f\u9884\u6d4b<\/p>\n<h1>dynamic_cast \u4e0e\u865a\u51fd\u6570<\/h1>\n<p>\u901a\u5e38\u60c5\u51b5\u4e0b, \u865a\u51fd\u6570\u8c03\u7528\u53ea\u6bd4\u666e\u901a\u51fd\u6570\u8c03\u7528\u7565\u5fae\u6162\u4e00\u70b9 (\u591a\u4e86\u4e00\u4e2a\u865a\u8868\u95f4\u63a5\u5bfb\u5740\u7684\u6b65\u9aa4)<\/p>\n<p>\u4e0d\u8fc7 dynamic_cast \u5c31\u4e0d\u540c\u4e86, \u5f80\u5f80\u9700\u8981\u904d\u5386\u7ee7\u627f\u6811, \u5c24\u5176\u5728\u591a\u7ee7\u627f\u548c\u865a\u7ee7\u627f\u7684\u65f6\u5019, \u6027\u80fd\u76f8\u5f53\u7cdf\u7cd5<\/p>\n<p>\u67d0\u4e9b\u5bf9\u6027\u80fd\u8981\u6c42\u9ad8\u7684\u573a\u5408, \u5982\u679c\u80fd\u591f\u660e\u786e\u7ee7\u627f\u5173\u7cfb\u548c\u7236\u5b50\u7c7b\u7684\u903b\u8f91\u5173\u7cfb, \u5c31\u9700\u8981\u5404\u79cd\u59ff\u52bf\u7ed5\u5f00 dynamic_cast \u4e86<\/p>\n<ul>\n<li>\n<p>\u59ff\u52bf1<\/p>\n<pre><code class=\"language-cpp\">class Base {\n    virtual ChildA *toChildA(void) {return NULL;}\n    virtual ChildB *toChildB(void) {return NULL;}\n};\nclass ChildA : public Base {\n    virtual ChildA *toChildA(void) {\n        return this;\n    }\n};\nclass ChildB : public Base {\n    virtual ChildB *toChildB(void) {\n        return this;\n    }\n};<\/code><\/pre>\n<p>\u6bd4\u8f83\u901a\u7528, \u51e0\u4e4e\u6ca1\u5565\u526f\u4f5c\u7528\u548c\u5751, \u4e0d\u8fc7\u7528\u8d77\u6765\u4e0d\u662f\u5f88\u7075\u6d3b, \u9002\u7528\u4e8e\u7236\u7c7b\u660e\u786e\u77e5\u9053\u5b50\u7c7b\u7c7b\u578b\u7684\u60c5\u51b5,<br \/>\n\u5178\u578b\u573a\u666f: \u7f51\u7edc\u6a21\u5757\u4e2d\u5404\u79cd Message \u7c7b\u578b<\/p>\n<\/li>\n<li>\n<p>\u59ff\u52bf2:<\/p>\n<pre><code class=\"language-cpp\">Child *child = isChildType(base) ? static_cast<Child *>(base) : NULL;<\/code><\/pre>\n<p>\u7075\u6d3b\u4f46\u662f\u5751\u4e5f\u5f88\u5927, isChildType \u672c\u8eab\u5c31\u6709\u5f88\u591a\u5b66\u95ee, static_cast \u66f4\u662f\u6709\u8bb2\u7a76\u4e0d\u80fd\u968f\u4fbf\u7528\u7684,<br \/>\n\u5178\u578b\u60c5\u51b5\u5c31\u662f\u591a\u7ee7\u627f\u4e2d\u4e0d\u80fd\u76f4\u63a5\u4f7f\u7528, \u6709\u5174\u8da3\u7684\u53ef\u4ee5\u53bb\u4e86\u89e3\u4e0b C\u8279 \u7684\u5bf9\u8c61\u5185\u5b58\u5e03\u5c40, \u5c31\u660e\u767d\u4e86<\/p>\n<p>\u5178\u578b: Qt \u4e2d\u7684 <code>qobject_cast<\/code>, \u8fd9\u90e8\u5206\u5b9e\u73b0\u7684\u6e90\u7801\u8fd8\u662f\u6bd4\u8f83\u503c\u5f97\u4e00\u770b\u7684 (\u9700\u8981\u5f88\u591a\u989d\u5916\u7684\u8f85\u52a9\u4ee3\u7801)<\/p>\n<p><a href=\"https:\/\/github.com\/ZFFramework\/ZFFramework\/blob\/master\/ZF\/ZFCore\/zfsrc\/ZFCore\/ZFObjectDef\/ZFObjectCast.h\">ZFObjectCast<\/a><br \/>\n\u91c7\u7528\u7684\u4e5f\u662f\u540c\u6837\u539f\u7406<\/p>\n<\/li>\n<\/ul>\n<h1>\u95f4\u63a5\u5bfb\u5740<\/h1>\n<p>\u8fd9\u662f\u4e2a\u770b\u4e0a\u53bb\u7b80\u5355\u6613\u61c2\u4f46\u5b9e\u9645\u4e0a\u5b66\u95ee\u975e\u5e38\u5927\u7684\u6027\u80fd\u4f18\u5316\u95ee\u9898<\/p>\n<ul>\n<li>\n<p>\u8868\u8c61: \u591a\u4e00\u6b21\u5bfb\u5740\u64cd\u4f5c<\/p>\n<pre><code class=\"language-cpp\">T *p = new T();\nT obj;\n\np->func(); \/\/ \u5b9e\u9645\u76f8\u5f53\u4e8e (*p).func();\nobj.func(); \/\/ \u901a\u5e38\u60c5\u51b5\u4e0b\u6bd4\u4e0a\u4e00\u884c\u7565\u5feb<\/code><\/pre>\n<\/li>\n<li>\n<p>\u6df1\u5c42\u6b21: \u5185\u5b58\u4ea4\u6362, CPU \u7f13\u5b58\u547d\u4e2d<\/p>\n<p>\u8981\u7406\u89e3\u8fd9\u4e9b, \u8fd8\u5f97\u5148\u4e86\u89e3\u4e00\u4e9b\u7f16\u8bd1\u539f\u7406\u548c\u786c\u4ef6\u67b6\u6784, \u8fd9\u8fb9\u7b80\u5355\u79d1\u666e\u4e00\u4e0b:<\/p>\n<ul>\n<li>\n<p>\u4e00\u6bb5\u7a0b\u5e8f\u8981\u6267\u884c, \u57fa\u672c\u4e0a\u5f97\u7ecf\u5386\u4ee5\u4e0b\u8fc7\u7a0b: \u786c\u76d8 &gt; \u5185\u5b58 &gt; CPU \u7f13\u5b58 &gt; \u5bc4\u5b58\u5668 &gt; \u8fd0\u7b97\u5355\u5143<\/p>\n<p>\u901f\u5ea6\u4ece\u6162\u5230\u5feb, \u4f46\u5bb9\u91cf\u4e5f\u4ece\u5927\u5230\u5c0f, \u5bb9\u91cf\u7ea7\u522b\u5927\u7ea6\u4e3a:<\/p>\n<p>\u786c\u76d8 (TB\/GB) &gt; \u5185\u5b58 (GB\/MB) &gt; CPU \u7f13\u5b58 (1MB~10MB) &gt; \u5bc4\u5b58\u5668 (\u5bc4\u5b58\u5668\u4e2a\u6570 * CPU\u5b57\u957f)<\/p>\n<\/li>\n<li>\n<p>\u4e3a\u4e86\u6027\u80fd, \u4e0a\u8ff0\u6bcf\u4e2a\u8fc7\u7a0b\u4e4b\u95f4\u57fa\u672c\u4e0a\u90fd\u6709\u7f13\u5b58<\/p>\n<\/li>\n<li>\n<p>\u7f13\u5b58\u6ca1\u547d\u4e2d\u7684\u65f6\u5019, \u5c31\u5fc5\u9700: \u5220\u9664\u65e7\u7684 &gt; \u4ece\u66f4\u6162\u4e00\u7ea7\u7684\u5b58\u50a8\u4ecb\u8d28\u4e2d\u8bfb\u53d6<\/p>\n<\/li>\n<li>\n<p>\u6b64\u5916, \u786c\u4ef6\u67b6\u6784\u901a\u5e38\u8fd8\u6709\u4ee5\u4e0b\u9650\u5236<\/p>\n<ul>\n<li>\u4e0d\u80fd\u8d8a\u7ea7\u8bfb\u53d6,<br \/>\n\u4f8b\u5982 CPU \u7f13\u5b58\u5fc5\u987b\u4ece\u5185\u5b58\u4e2d\u8bfb\u53d6, \u5982\u679c\u60f3\u8981\u786c\u76d8\u4e2d\u7684\u6570\u636e, \u5fc5\u987b\u5148\u4ece\u786c\u76d8\u8bfb\u53d6\u5230\u5185\u5b58\u4e2d,<br \/>\n\u518d\u4ece\u5185\u5b58\u4e2d\u8bfb\u53d6<\/li>\n<li>\u8bfb\u53d6\u65f6\u901a\u5e38\u53ea\u80fd\u8bfb\u53d6\u8fde\u7eed\u7684\u4e00\u6bb5\u6570\u636e, \u5206\u9875\u8bfb\u53d6<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u61c2\u4e86\u4e0a\u8ff0\u8fd9\u4e9b, \u518d\u56de\u53bb\u770b\u4e0a\u9762\u7684\u4f8b\u5b50<\/p>\n<ul>\n<li><code>T obj;<\/code> : \u5c40\u90e8\u53d8\u91cf, \u7f16\u8bd1\u5668\u5f88\u5bb9\u6613\u548c\u51fd\u6570\u6267\u884c\u4ee3\u7801\u7b49\u4f18\u5316\u4e3a\u4e00\u6bb5\u8fde\u7eed\u7684\u6570\u636e,<br \/>\n\u5f88\u5bb9\u6613\u4e00\u6b21\u6027\u88c5\u5165 CPU \u7f13\u5b58\u4e2d<\/li>\n<li><code>new T()<\/code> \u6216\u8005\u4ece\u522b\u7684\u5168\u5c40\u53d8\u91cf\u4e2d\u53d6\u5730\u5740 : \u5bf9\u8c61\u5b58\u50a8\u7684\u4f4d\u7f6e\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u8fdc\u79bb\u51fd\u6570\u5185\u5bb9\u6240\u5728\u7684\u5730\u5740,<br \/>\n\u8bbf\u95ee\u65f6\u5bb9\u6613\u6d89\u53ca\u5230\u7f13\u5b58\u5931\u6548, \u9020\u6210\u6362\u9875 (\u901a\u5e38\u662f CPU \u7f13\u5b58\u672a\u547d\u4e2d)<\/li>\n<\/ul>\n<p>\u5f53\u7136, \u5373\u4f7f\u77e5\u9053\u4e86\u8fd9\u4e9b, \u95f4\u63a5\u5bfb\u5740\u7684\u6027\u80fd\u4f18\u5316\u95ee\u9898\u4f9d\u65e7\u662f\u7384\u5b66, \u5e76\u6ca1\u6709\u4ec0\u4e48\u4e07\u7528\u7684\u65b9\u6cd5,<br \/>\n\u4e3a\u4e86\u7075\u6d3b\u6027\u727a\u7272\u6027\u80fd\u4e5f\u662f\u5e38\u6709\u7684\u4e8b, \u6700\u7b80\u5355\u7c97\u66b4\u7684\u5178\u578b\u662f, \u628a\u8fde\u7eed\u7684\u6307\u9488\u8bbf\u95ee\u66ff\u6362\u4e3a\u5bf9\u8c61\u5f15\u7528\u8bbf\u95ee:<\/p>\n<pre><code class=\"language-cpp\">T *p = xxx;\np->a();\np->b();\np->c();\n\n\/\/ \u66ff\u6362\u4e3a\nT *p = xxx;\nT &ref = *p;\nref.a();\nref.b();\nref.c();<\/code><\/pre>\n<\/li>\n<\/ul>\n<h1>\u603b\u7ed3<\/h1>\n<p>\u4e0a\u8ff0\u63d0\u5230\u7684\u5927\u591a\u8fd8\u662f\u6bd4\u8f83\u5c11\u9047\u5230\u7684\u60c5\u51b5, &quot;\u4e0d\u8981\u8fc7\u65e9\u4f18\u5316&quot; \u4f9d\u65e7\u662f\u771f\u7406,<br \/>\n\u800c\u4e14\u5927\u591a\u6570\u60c5\u51b5\u4e0b, \u6027\u80fd\u4f18\u5316\u90fd\u662f\u4e00\u4e2a\u6743\u8861\u95ee\u9898, \u597d\u597d\u9075\u5faa\u4e8c\u516b\u539f\u5219,<br \/>\n\u628a\u6709\u9650\u7684\u6027\u80fd\u4f18\u5316\u7684\u9884\u7b97\u653e\u5230\u90a3 20% \u7684\u91cd\u8981\u70b9\u4e0a,<br \/>\n\u624d\u662f\u6700\u9002\u5408\u7684\u65b9\u5f0f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5728\u6298\u817e\u4e00\u4e9b\u6027\u80fd\u4f18\u5316\u7684\u4e8b\u513f, \u987a\u4fbf\u8bb0\u5f55\u4e00\u4e0b \u5f53\u7136, \u70c2\u5927\u8857\u7684\u6284\u6765\u6284\u53bb\u6700\u6ca1\u610f\u601d\u4e86, \u8fd9\u91cc\u4e00\u5982\u65e2\u5f80\u7684\u5217\u4e00\u4e9b\u4e0d\u5e38\u89c1\u2026 <span class=\"read-more\"><a href=\"http:\/\/zsaber.com\/blog\/p\/170\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>C++ \u6027\u80fd\u4f18\u5316\u90a3\u4e9b\u4e8b\u513f - \u67d0Z\u7684\u535a\u5ba2<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/zsaber.com\/blog\/p\/170\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C++ \u6027\u80fd\u4f18\u5316\u90a3\u4e9b\u4e8b\u513f - \u67d0Z\u7684\u535a\u5ba2\" \/>\n<meta property=\"og:description\" content=\"\u6700\u8fd1\u5728\u6298\u817e\u4e00\u4e9b\u6027\u80fd\u4f18\u5316\u7684\u4e8b\u513f, \u987a\u4fbf\u8bb0\u5f55\u4e00\u4e0b \u5f53\u7136, \u70c2\u5927\u8857\u7684\u6284\u6765\u6284\u53bb\u6700\u6ca1\u610f\u601d\u4e86, \u8fd9\u91cc\u4e00\u5982\u65e2\u5f80\u7684\u5217\u4e00\u4e9b\u4e0d\u5e38\u89c1\u2026 Read More &raquo;\" \/>\n<meta property=\"og:url\" content=\"http:\/\/zsaber.com\/blog\/p\/170\" \/>\n<meta property=\"og:site_name\" content=\"\u67d0Z\u7684\u535a\u5ba2\" \/>\n<meta property=\"article:published_time\" content=\"2017-05-14T15:34:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-08-26T07:51:12+00:00\" \/>\n<meta name=\"author\" content=\"Z\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Z\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/zsaber.com\/blog\/p\/170#article\",\"isPartOf\":{\"@id\":\"http:\/\/zsaber.com\/blog\/p\/170\"},\"author\":{\"name\":\"Z\",\"@id\":\"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f\"},\"headline\":\"C++ \u6027\u80fd\u4f18\u5316\u90a3\u4e9b\u4e8b\u513f\",\"datePublished\":\"2017-05-14T15:34:34+00:00\",\"dateModified\":\"2019-08-26T07:51:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/zsaber.com\/blog\/p\/170\"},\"wordCount\":42,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f\"},\"articleSection\":[\"C++\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/zsaber.com\/blog\/p\/170#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/zsaber.com\/blog\/p\/170\",\"url\":\"http:\/\/zsaber.com\/blog\/p\/170\",\"name\":\"C++ \u6027\u80fd\u4f18\u5316\u90a3\u4e9b\u4e8b\u513f - \u67d0Z\u7684\u535a\u5ba2\",\"isPartOf\":{\"@id\":\"http:\/\/zsaber.com\/blog\/#website\"},\"datePublished\":\"2017-05-14T15:34:34+00:00\",\"dateModified\":\"2019-08-26T07:51:12+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/zsaber.com\/blog\/p\/170#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/zsaber.com\/blog\/p\/170\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/zsaber.com\/blog\/p\/170#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"http:\/\/zsaber.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"C++ \u6027\u80fd\u4f18\u5316\u90a3\u4e9b\u4e8b\u513f\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/zsaber.com\/blog\/#website\",\"url\":\"http:\/\/zsaber.com\/blog\/\",\"name\":\"\u67d0Z\u7684\u535a\u5ba2\",\"description\":\"\u7b80\u4ecb\u53c8\u4e0d\u80fd\u5403\",\"publisher\":{\"@id\":\"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/zsaber.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f\",\"name\":\"Z\",\"logo\":{\"@id\":\"http:\/\/zsaber.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"\u67d0Z\",\"sameAs\":[\"http:\/\/ZFFramework.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"C++ \u6027\u80fd\u4f18\u5316\u90a3\u4e9b\u4e8b\u513f - \u67d0Z\u7684\u535a\u5ba2","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/zsaber.com\/blog\/p\/170","og_locale":"zh_CN","og_type":"article","og_title":"C++ \u6027\u80fd\u4f18\u5316\u90a3\u4e9b\u4e8b\u513f - \u67d0Z\u7684\u535a\u5ba2","og_description":"\u6700\u8fd1\u5728\u6298\u817e\u4e00\u4e9b\u6027\u80fd\u4f18\u5316\u7684\u4e8b\u513f, \u987a\u4fbf\u8bb0\u5f55\u4e00\u4e0b \u5f53\u7136, \u70c2\u5927\u8857\u7684\u6284\u6765\u6284\u53bb\u6700\u6ca1\u610f\u601d\u4e86, \u8fd9\u91cc\u4e00\u5982\u65e2\u5f80\u7684\u5217\u4e00\u4e9b\u4e0d\u5e38\u89c1\u2026 Read More &raquo;","og_url":"http:\/\/zsaber.com\/blog\/p\/170","og_site_name":"\u67d0Z\u7684\u535a\u5ba2","article_published_time":"2017-05-14T15:34:34+00:00","article_modified_time":"2019-08-26T07:51:12+00:00","author":"Z","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"Z","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/zsaber.com\/blog\/p\/170#article","isPartOf":{"@id":"http:\/\/zsaber.com\/blog\/p\/170"},"author":{"name":"Z","@id":"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f"},"headline":"C++ \u6027\u80fd\u4f18\u5316\u90a3\u4e9b\u4e8b\u513f","datePublished":"2017-05-14T15:34:34+00:00","dateModified":"2019-08-26T07:51:12+00:00","mainEntityOfPage":{"@id":"http:\/\/zsaber.com\/blog\/p\/170"},"wordCount":42,"commentCount":0,"publisher":{"@id":"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f"},"articleSection":["C++"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/zsaber.com\/blog\/p\/170#respond"]}]},{"@type":"WebPage","@id":"http:\/\/zsaber.com\/blog\/p\/170","url":"http:\/\/zsaber.com\/blog\/p\/170","name":"C++ \u6027\u80fd\u4f18\u5316\u90a3\u4e9b\u4e8b\u513f - \u67d0Z\u7684\u535a\u5ba2","isPartOf":{"@id":"http:\/\/zsaber.com\/blog\/#website"},"datePublished":"2017-05-14T15:34:34+00:00","dateModified":"2019-08-26T07:51:12+00:00","breadcrumb":{"@id":"http:\/\/zsaber.com\/blog\/p\/170#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/zsaber.com\/blog\/p\/170"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/zsaber.com\/blog\/p\/170#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/zsaber.com\/blog"},{"@type":"ListItem","position":2,"name":"C++ \u6027\u80fd\u4f18\u5316\u90a3\u4e9b\u4e8b\u513f"}]},{"@type":"WebSite","@id":"http:\/\/zsaber.com\/blog\/#website","url":"http:\/\/zsaber.com\/blog\/","name":"\u67d0Z\u7684\u535a\u5ba2","description":"\u7b80\u4ecb\u53c8\u4e0d\u80fd\u5403","publisher":{"@id":"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/zsaber.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f","name":"Z","logo":{"@id":"http:\/\/zsaber.com\/blog\/#\/schema\/person\/image\/"},"description":"\u67d0Z","sameAs":["http:\/\/ZFFramework.com"]}]}},"_links":{"self":[{"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/posts\/170"}],"collection":[{"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/comments?post=170"}],"version-history":[{"count":0,"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/posts\/170\/revisions"}],"wp:attachment":[{"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/media?parent=170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/categories?post=170"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/tags?post=170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}