Questions tagged «trailing-return-type»

4
尾随返回类型的语法样式是否应该成为新的C ++ 11程序的默认样式?[关闭]
已关闭。这个问题是基于观点的。它当前不接受答案。 想改善这个问题吗?更新问题,以便通过编辑此帖子以事实和引用的形式回答。 3年前关闭。 改善这个问题 C ++ 11支持新的函数语法: auto func_name(int x, int y) -> int; 当前,此函数将声明为: int func_name(int x, int y); 新样式似乎尚未被广泛采用(例如在gcc stl中) 但是,这种新样式是否应该在新的C ++ 11程序中到处都是首选,还是仅在需要时使用? 就个人而言,我尽可能地选择旧样式,但是混合样式的代码库看起来很难看。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.