{"id":107741,"date":"2026-09-20T08:16:36","date_gmt":"2026-09-20T00:16:36","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/107741.html"},"modified":"2026-09-20T08:16:36","modified_gmt":"2026-09-20T00:16:36","slug":"%e6%b7%b1%e5%85%a5%e7%90%86%e8%a7%a3c-%e9%87%8d%e8%bd%bd-%ef%bc%9c%e4%ba%8c%ef%bc%9e-%e9%87%8d%e8%bd%bd%e8%a7%a3%e6%9e%90%ef%bc%9a%e7%bc%96%e8%af%91%e5%99%a8%e5%a6%82%e4%bd%95%e9%80%89%e6%8b%a9","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/107741.html","title":{"rendered":"\u6df1\u5165\u7406\u89e3C++ \u91cd\u8f7d \uff1c\u4e8c\uff1e \u91cd\u8f7d\u89e3\u6790\uff1a\u7f16\u8bd1\u5668\u5982\u4f55\u9009\u62e9\u51fd\u6570"},"content":{"rendered":"<p>\u91cd\u8f7d\u89e3\u6790&#xff08;overload resolution&#xff09;\u662f C&#043;&#043; \u7f16\u8bd1\u5668\u5728\u8c03\u7528\u91cd\u8f7d\u51fd\u6570\u65f6&#xff0c;\u6839\u636e\u5b9e\u53c2\u5728\u7f16\u8bd1\u671f\u9009\u62e9\u6700\u5408\u9002\u51fd\u6570\u7684\u8fc7\u7a0b\u3002\u7406\u89e3\u5b83\u7684\u5173\u952e\u662f\u638c\u63e1\u4e09\u4e2a\u6b65\u9aa4\u548c\u8f6c\u6362\u5e8f\u5217\u7684\u7b49\u7ea7\u3002<\/p>\n<hr \/>\n<h3>1. \u91cd\u8f7d\u89e3\u6790\u7684\u4e09\u4e2a\u6b65\u9aa4<\/h3>\n<p>\u5047\u8bbe\u6709\u8fd9\u6837\u4e00\u6b21\u8c03\u7528 f(args&#8230;)&#xff0c;\u7f16\u8bd1\u5668\u6309\u987a\u5e8f\u6267\u884c&#xff1a;<\/p>\n<h4>\u7b2c\u4e00\u6b65&#xff1a;\u786e\u5b9a\u5019\u9009\u51fd\u6570&#xff08;candidate functions&#xff09;<\/h4>\n<p>\u5019\u9009\u51fd\u6570\u662f\u540d\u5b57\u67e5\u627e\u627e\u5230\u7684\u6240\u6709\u540c\u540d\u51fd\u6570&#xff0c;\u5305\u62ec&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u540c\u4e00\u4f5c\u7528\u57df\u4e2d\u58f0\u660e\u7684\u540c\u540d\u51fd\u6570&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u901a\u8fc7 using \u5f15\u5165\u7684\u540c\u540d\u51fd\u6570&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u901a\u8fc7 ADL&#xff08;\u5b9e\u53c2\u4f9d\u8d56\u67e5\u627e&#xff09;\u5728\u5b9e\u53c2\u5173\u8054\u547d\u540d\u7a7a\u95f4\u4e2d\u627e\u5230\u7684\u540c\u540d\u51fd\u6570&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u51fd\u6570\u6a21\u677f&#xff08;\u4f1a\u5148\u63a8\u5bfc\u6a21\u677f\u53c2\u6570&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<h4>\u7b2c\u4e8c\u6b65&#xff1a;\u786e\u5b9a\u53ef\u884c\u51fd\u6570&#xff08;viable functions&#xff09;<\/h4>\n<p>\u53ef\u884c\u51fd\u6570\u5fc5\u987b\u6ee1\u8db3\u4e24\u4e2a\u6761\u4ef6&#xff1a;<\/p>\n<li>\n<p>\u53c2\u6570\u4e2a\u6570\u5339\u914d&#xff08;\u8003\u8651\u9ed8\u8ba4\u53c2\u6570\u540e&#xff09;&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u6bcf\u4e2a\u5b9e\u53c2\u90fd\u80fd\u9690\u5f0f\u8f6c\u6362\u5230\u5bf9\u5e94\u5f62\u53c2\u7c7b\u578b\u3002<\/p>\n<\/li>\n<p>\u4e0d\u6ee1\u8db3\u4efb\u4e00\u6761\u4ef6\u7684\u51fd\u6570\u88ab\u6dd8\u6c70\u3002<\/p>\n<h4>\u7b2c\u4e09\u6b65&#xff1a;\u9009\u62e9\u6700\u4f73\u53ef\u884c\u51fd\u6570&#xff08;best viable function&#xff09;<\/h4>\n<p>\u5bf9\u6bcf\u4e2a\u53ef\u884c\u51fd\u6570&#xff0c;\u4e3a\u6bcf\u4e2a\u5b9e\u53c2\u8ba1\u7b97\u4e00\u4e2a\u9690\u5f0f\u8f6c\u6362\u5e8f\u5217&#xff08;implicit conversion sequence&#xff09;&#xff0c;\u7136\u540e\u4e24\u4e24\u6bd4\u8f83\u3002<\/p>\n<p>\u89c4\u5219&#xff1a;<\/p>\n<p>\u5982\u679c\u51fd\u6570 A \u5bf9\u6bcf\u4e2a\u53c2\u6570\u7684\u8f6c\u6362\u90fd\u4e0d\u6bd4 B \u5dee&#xff0c;\u4e14\u81f3\u5c11\u6709\u4e00\u4e2a\u53c2\u6570\u7684\u8f6c\u6362\u6bd4 B \u597d&#xff0c;\u5219 A \u80dc\u51fa\u3002<\/p>\n<p>\u5982\u679c\u627e\u4e0d\u5230\u8fd9\u6837\u7684\u51fd\u6570&#xff0c;\u5c31\u662f\u4e8c\u4e49\u6027&#xff08;ambiguous&#xff09;&#xff0c;\u7f16\u8bd1\u62a5\u9519\u3002<\/p>\n<hr \/>\n<h3>2. \u9690\u5f0f\u8f6c\u6362\u5e8f\u5217\u7684\u7b49\u7ea7<\/h3>\n<p>\u4ece\u597d\u5230\u5dee&#xff1a;<\/p>\n<table>\n<tr>\u7b49\u7ea7\u5185\u5bb9\u4f8b\u5b50<\/tr>\n<tbody>\n<tr>\n<td>1. \u7cbe\u786e\u5339\u914d<\/td>\n<td>identity\u3001\u5de6\u503c\u5230\u53f3\u503c\u3001\u6570\u7ec4\u5230\u6307\u9488\u3001\u51fd\u6570\u5230\u6307\u9488\u3001\u9650\u5b9a\u8f6c\u6362<\/td>\n<td>int -&gt; int&#xff0c;int[3] -&gt; int*&#xff0c;int -&gt; const int<\/td>\n<\/tr>\n<tr>\n<td>2. \u63d0\u5347<\/td>\n<td>\u6574\u578b\u63d0\u5347\u3001\u6d6e\u70b9\u63d0\u5347<\/td>\n<td>char -&gt; int&#xff0c;short -&gt; int&#xff0c;float -&gt; double<\/td>\n<\/tr>\n<tr>\n<td>3. \u6807\u51c6\u8f6c\u6362<\/td>\n<td>\u5176\u4ed6\u5185\u7f6e\u7c7b\u578b\u8f6c\u6362\u3001\u6307\u9488\u8f6c\u6362\u3001bool \u8f6c\u6362<\/td>\n<td>int -&gt; double&#xff0c;double -&gt; int&#xff0c;T* -&gt; void*<\/td>\n<\/tr>\n<tr>\n<td>4. \u7528\u6237\u5b9a\u4e49\u8f6c\u6362<\/td>\n<td>\u901a\u8fc7\u8f6c\u6362\u6784\u9020\u51fd\u6570\u6216 operator T()<\/td>\n<td>const char* -&gt; std::string<\/td>\n<\/tr>\n<tr>\n<td>5. \u7701\u7565\u53f7\u5339\u914d<\/td>\n<td>&#8230;<\/td>\n<td>f(&#8230;)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6ce8\u610f&#xff1a;\u63d0\u5347\u4f18\u4e8e\u6807\u51c6\u8f6c\u6362&#xff0c;\u8fd9\u662f\u5f88\u591a\u91cd\u8f7d\u89e3\u6790\u7ed3\u679c\u7684\u5173\u952e\u3002<\/p>\n<hr \/>\n<h3>3. \u5e38\u89c1\u7279\u6b8a\u89c4\u5219<\/h3>\n<h4>3.1 \u975e\u6a21\u677f\u4f18\u5148<\/h4>\n<p>\u666e\u901a\u51fd\u6570\u548c\u51fd\u6570\u6a21\u677f\u90fd\u80fd\u5339\u914d\u4e14\u8f6c\u6362\u5e8f\u5217\u76f8\u540c\u65f6&#xff0c;\u666e\u901a\u51fd\u6570\u4f18\u5148\u3002<\/p>\n<p>cpp<\/p>\n<p>template&lt;class T&gt; void f(T);<br \/>\nvoid f(int);<\/p>\n<p>f(1); \/\/ \u8c03\u7528 f(int)&#xff0c;\u975e\u6a21\u677f\u4f18\u5148<\/p>\n<h4>3.2 \u66f4\u7279\u5316\u7684\u6a21\u677f\u4f18\u5148<\/h4>\n<p>\u4e24\u4e2a\u6a21\u677f\u90fd\u5339\u914d\u65f6&#xff0c;\u9009\u62e9\u66f4\u7279\u5316\u7684\u90a3\u4e2a\u3002<\/p>\n<p>cpp<\/p>\n<p>template&lt;class T&gt; void f(T);<br \/>\ntemplate&lt;class T&gt; void f(T*);<\/p>\n<p>int x;<br \/>\nf(&amp;x); \/\/ \u8c03\u7528 f(T*)&#xff0c;\u66f4\u7279\u5316<\/p>\n<h4>3.3 \u4e8c\u4e49\u6027\u793a\u4f8b<\/h4>\n<p>cpp<\/p>\n<p>void f(long);<br \/>\nvoid f(double);<\/p>\n<p>f(1); \/\/ int -&gt; long \u548c int -&gt; double \u90fd\u662f\u6807\u51c6\u8f6c\u6362&#xff0c;\u4e8c\u4e49\u6027<\/p>\n<h4>3.4 \u591a\u4e2a\u53c2\u6570\u7684\u6bd4\u8f83<\/h4>\n<p>\u5bf9\u4e8e\u591a\u53c2\u6570\u51fd\u6570&#xff0c;\u5fc5\u987b\u6574\u4f53\u6bd4\u8f83&#xff1a;<\/p>\n<p>cpp<\/p>\n<p>void f(int, double);<br \/>\nvoid f(double, int);<\/p>\n<p>f(1, 2); \/\/ \u4e24\u4e2a\u51fd\u6570\u5404\u6709\u4e00\u4e2a\u53c2\u6570\u66f4\u597d&#xff0c;\u4e8c\u4e49\u6027<\/p>\n<p>#include &lt;iostream&gt;<br \/>\n#include &lt;string&gt;<\/p>\n<p>\/\/ &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061; \u91cd\u8f7d\u96c6\u5408 &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\nvoid f(int x)                  { std::cout &lt;&lt; &#034;f(int)          &lt;- &#034; &lt;&lt; x &lt;&lt; &#034;\\\\n&#034;; }<br \/>\nvoid f(double x)               { std::cout &lt;&lt; &#034;f(double)       &lt;- &#034; &lt;&lt; x &lt;&lt; &#034;\\\\n&#034;; }<br \/>\nvoid f(char x)                 { std::cout &lt;&lt; &#034;f(char)         &lt;- &#034; &lt;&lt; x &lt;&lt; &#034;\\\\n&#034;; }<br \/>\nvoid f(long x)                 { std::cout &lt;&lt; &#034;f(long)         &lt;- &#034; &lt;&lt; x &lt;&lt; &#034;\\\\n&#034;; }<br \/>\nvoid f(const std::string&amp; s)   { std::cout &lt;&lt; &#034;f(std::string)  &lt;- &#034; &lt;&lt; s &lt;&lt; &#034;\\\\n&#034;; }<br \/>\nvoid f(int x, int y)           { std::cout &lt;&lt; &#034;f(int,int)      &lt;- &#034; &lt;&lt; x &lt;&lt; &#034;,&#034; &lt;&lt; y &lt;&lt; &#034;\\\\n&#034;; }<br \/>\nvoid f(int x, double y)        { std::cout &lt;&lt; &#034;f(int,double)   &lt;- &#034; &lt;&lt; x &lt;&lt; &#034;,&#034; &lt;&lt; y &lt;&lt; &#034;\\\\n&#034;; }<\/p>\n<p>int main() {<br \/>\n    std::cout &lt;&lt; &#034;&#8212; \u7cbe\u786e\u5339\u914d &#8212;\\\\n&#034;;<br \/>\n    f(42);            \/\/ f(int)<br \/>\n    f(3.14);          \/\/ f(double)<br \/>\n    f(&#039;a&#039;);           \/\/ f(char)<br \/>\n    f(42L);           \/\/ f(long)<\/p>\n<p>    std::cout &lt;&lt; &#034;\\\\n&#8212; \u63d0\u5347 &#8212;\\\\n&#034;;<br \/>\n    f(1.0f);          \/\/ float -&gt; double&#xff0c;\u8c03\u7528 f(double)<br \/>\n    f(short(7));      \/\/ short -&gt; int&#xff0c;\u8c03\u7528 f(int)<\/p>\n<p>    std::cout &lt;&lt; &#034;\\\\n&#8212; \u7528\u6237\u5b9a\u4e49\u8f6c\u6362 &#8212;\\\\n&#034;;<br \/>\n    f(&#034;hello&#034;);       \/\/ const char* -&gt; std::string&#xff0c;\u8c03\u7528 f(std::string)<\/p>\n<p>    std::cout &lt;&lt; &#034;\\\\n&#8212; \u591a\u53c2\u6570 &#8212;\\\\n&#034;;<br \/>\n    f(1, 2);          \/\/ f(int,int)<br \/>\n    f(1, 2.0);        \/\/ f(int,double)<br \/>\n    f(1, 2.0f);       \/\/ float -&gt; double&#xff0c;\u8c03\u7528 f(int,double)<br \/>\n    return 0;<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u91cd\u8f7d\u89e3\u6790&#xff08;overload resolution&#xff09;\u662f C \u7f16\u8bd1\u5668\u5728\u8c03\u7528\u91cd\u8f7d\u51fd\u6570\u65f6&#xff0c;\u6839\u636e\u5b9e\u53c2\u5728\u7f16\u8bd1\u671f\u9009\u62e9\u6700\u5408\u9002\u51fd\u6570\u7684\u8fc7\u7a0b\u3002\u7406\u89e3\u5b83\u7684\u5173\u952e\u662f\u638c\u63e1\u4e09\u4e2a\u6b65\u9aa4\u548c\u8f6c\u6362\u5e8f\u5217\u7684\u7b49\u7ea7\u30021. \u91cd\u8f7d\u89e3\u6790\u7684\u4e09\u4e2a\u6b65\u9aa4\u5047\u8bbe\u6709\u8fd9\u6837\u4e00\u6b21\u8c03\u7528 f(args&#8230;)&#xff0c;\u7f16\u8bd1\u5668\u6309\u987a\u5e8f\u6267\u884c&#xff1a;\u7b2c\u4e00\u6b65&#xff1a;\u786e\u5b9a\u5019\u9009\u51fd\u6570&#xff08;candidate functions&#xff09;\u5019\u9009\u51fd\u6570\u662f\u540d\u5b57\u67e5\u627e\u627e\u5230\u7684\u6240\u6709\u540c\u540d\u51fd\u6570&#xff0c;\u5305\u62ec&amp;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[55,190],"topic":[],"class_list":["post-107741","post","type-post","status-publish","format-standard","hentry","category-server","tag-c","tag-190"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6df1\u5165\u7406\u89e3C++ \u91cd\u8f7d \uff1c\u4e8c\uff1e \u91cd\u8f7d\u89e3\u6790\uff1a\u7f16\u8bd1\u5668\u5982\u4f55\u9009\u62e9\u51fd\u6570 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/107741.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6df1\u5165\u7406\u89e3C++ \u91cd\u8f7d \uff1c\u4e8c\uff1e \u91cd\u8f7d\u89e3\u6790\uff1a\u7f16\u8bd1\u5668\u5982\u4f55\u9009\u62e9\u51fd\u6570 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u91cd\u8f7d\u89e3\u6790&#xff08;overload resolution&#xff09;\u662f C \u7f16\u8bd1\u5668\u5728\u8c03\u7528\u91cd\u8f7d\u51fd\u6570\u65f6&#xff0c;\u6839\u636e\u5b9e\u53c2\u5728\u7f16\u8bd1\u671f\u9009\u62e9\u6700\u5408\u9002\u51fd\u6570\u7684\u8fc7\u7a0b\u3002\u7406\u89e3\u5b83\u7684\u5173\u952e\u662f\u638c\u63e1\u4e09\u4e2a\u6b65\u9aa4\u548c\u8f6c\u6362\u5e8f\u5217\u7684\u7b49\u7ea7\u30021. \u91cd\u8f7d\u89e3\u6790\u7684\u4e09\u4e2a\u6b65\u9aa4\u5047\u8bbe\u6709\u8fd9\u6837\u4e00\u6b21\u8c03\u7528 f(args...)&#xff0c;\u7f16\u8bd1\u5668\u6309\u987a\u5e8f\u6267\u884c&#xff1a;\u7b2c\u4e00\u6b65&#xff1a;\u786e\u5b9a\u5019\u9009\u51fd\u6570&#xff08;candidate functions&#xff09;\u5019\u9009\u51fd\u6570\u662f\u540d\u5b57\u67e5\u627e\u627e\u5230\u7684\u6240\u6709\u540c\u540d\u51fd\u6570&#xff0c;\u5305\u62ec&amp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/107741.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-20T00:16:36+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/107741.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/107741.html\",\"name\":\"\u6df1\u5165\u7406\u89e3C++ \u91cd\u8f7d \uff1c\u4e8c\uff1e \u91cd\u8f7d\u89e3\u6790\uff1a\u7f16\u8bd1\u5668\u5982\u4f55\u9009\u62e9\u51fd\u6570 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-20T00:16:36+00:00\",\"dateModified\":\"2026-09-20T00:16:36+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/107741.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/107741.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/107741.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6df1\u5165\u7406\u89e3C++ \u91cd\u8f7d \uff1c\u4e8c\uff1e \u91cd\u8f7d\u89e3\u6790\uff1a\u7f16\u8bd1\u5668\u5982\u4f55\u9009\u62e9\u51fd\u6570\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u6df1\u5165\u7406\u89e3C++ \u91cd\u8f7d \uff1c\u4e8c\uff1e \u91cd\u8f7d\u89e3\u6790\uff1a\u7f16\u8bd1\u5668\u5982\u4f55\u9009\u62e9\u51fd\u6570 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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":"https:\/\/www.wsisp.com\/helps\/107741.html","og_locale":"zh_CN","og_type":"article","og_title":"\u6df1\u5165\u7406\u89e3C++ \u91cd\u8f7d \uff1c\u4e8c\uff1e \u91cd\u8f7d\u89e3\u6790\uff1a\u7f16\u8bd1\u5668\u5982\u4f55\u9009\u62e9\u51fd\u6570 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u91cd\u8f7d\u89e3\u6790&#xff08;overload resolution&#xff09;\u662f C \u7f16\u8bd1\u5668\u5728\u8c03\u7528\u91cd\u8f7d\u51fd\u6570\u65f6&#xff0c;\u6839\u636e\u5b9e\u53c2\u5728\u7f16\u8bd1\u671f\u9009\u62e9\u6700\u5408\u9002\u51fd\u6570\u7684\u8fc7\u7a0b\u3002\u7406\u89e3\u5b83\u7684\u5173\u952e\u662f\u638c\u63e1\u4e09\u4e2a\u6b65\u9aa4\u548c\u8f6c\u6362\u5e8f\u5217\u7684\u7b49\u7ea7\u30021. \u91cd\u8f7d\u89e3\u6790\u7684\u4e09\u4e2a\u6b65\u9aa4\u5047\u8bbe\u6709\u8fd9\u6837\u4e00\u6b21\u8c03\u7528 f(args...)&#xff0c;\u7f16\u8bd1\u5668\u6309\u987a\u5e8f\u6267\u884c&#xff1a;\u7b2c\u4e00\u6b65&#xff1a;\u786e\u5b9a\u5019\u9009\u51fd\u6570&#xff08;candidate functions&#xff09;\u5019\u9009\u51fd\u6570\u662f\u540d\u5b57\u67e5\u627e\u627e\u5230\u7684\u6240\u6709\u540c\u540d\u51fd\u6570&#xff0c;\u5305\u62ec&amp;","og_url":"https:\/\/www.wsisp.com\/helps\/107741.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-20T00:16:36+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/107741.html","url":"https:\/\/www.wsisp.com\/helps\/107741.html","name":"\u6df1\u5165\u7406\u89e3C++ \u91cd\u8f7d \uff1c\u4e8c\uff1e \u91cd\u8f7d\u89e3\u6790\uff1a\u7f16\u8bd1\u5668\u5982\u4f55\u9009\u62e9\u51fd\u6570 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-20T00:16:36+00:00","dateModified":"2026-09-20T00:16:36+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/107741.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/107741.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/107741.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u6df1\u5165\u7406\u89e3C++ \u91cd\u8f7d \uff1c\u4e8c\uff1e \u91cd\u8f7d\u89e3\u6790\uff1a\u7f16\u8bd1\u5668\u5982\u4f55\u9009\u62e9\u51fd\u6570"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/107741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=107741"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/107741\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=107741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=107741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=107741"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=107741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}