ç®æ¬¡ ç®æ¬¡ ãæ»ãå¤åã®å¾ç½®è¨æ³ãã£ã¦ä½ï¼ ä½ãå¬ããã®ï¼ åé¡ç¹ ãæ»ãå¤åã®å¾ç½®è¨æ³ãã£ã¦ä½ï¼ C++11ããå°å ¥ãããè¨èªä»æ§ã§ãã ã¿ã¤ãã«ã®å¼ã³æ¹ã¯èªåãåæã«ä½¿ã£ã¦ããã ãã§ãè±èªåã ã¨ãtrailing-return-typeãããã使ããããããã cpprefjp.github.io ãã®ä»æ§ã使ãã¨ä¾ãã°ä»¥ä¸ã®ãããªã³ã¼ãã int Add(int a, int b) { return a + b; } ãã®ããã«ãªãã¾ãã auto Add(int a, int b) -> int { return a + b; } ä½ãå¬ããã®ï¼ ãã®ä»æ§ã¯C++ã®ã¡ã¿ããã°ã©ãã³ã°ã§æ»ãå¤åã®æ¨è«ãç°¡åã«è¡ãç®çã§ä½¿ç¨ããã¾ãã ãªãã ããããªC++ä¸ç´è ã®ããã®æ©è½ãªãã¦ä¸ã ã®äººéã«ã¯é¢ä¿ãªãããããã¨ãæãããããã¾ãããããã®æ©è½ã«ã¯ããä¸ã¤ãããããã大ããªã¡ãªããããã
{{#tags}}- {{label}}
{{/tags}}