简体   繁体   English

这是g ++ c ++ 14支持中的错误吗?

[英]Is this a bug in g++ c++14 support?

It seems that with auto parameters g++ just uses first auto it encounters. 似乎使用auto参数g ++只使用它遇到的第一个auto Is this a bug? 这是一个错误吗?

auto f(std::vector<auto> a)
{
    a.push_back('0');
    return std::string("");
}

http://ideone.com/T69ytm http://ideone.com/T69ytm

As stated by @SergeyA, this is a GCC bug. 正如@SergeyA所述,这是一个GCC错误。 std::vector<auto> should not have been accepted. 不应该接受std::vector<auto>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在NetBeans 8.1中正确配置g ++编译器以获得c ++ 11 / c ++ 14支持? - How to configure g++ compiler in netbeans 8.1 correctly for c++11/c++14 support? g ++ 4.9拒绝C ++ 14中的有效聚合初始化 - g++ 4.9 rejects valid aggregate initialization in C++14 如何使 g++ -std=c++14 成为默认选项 - How to make g++ -std=c++14 the default option 工作C ++ 03代码上的G ++(C ++ 14)链接器错误 - G++ (C++14) linker error on working C++03 code g ++编译选项-std = c ++ 14编译错误,显示Werror = c ++ 11-compat - g++ compile options with -std=c++14 compile error showing Werror=c++11-compat 为什么这个变量在 C++14 中的 g++ 中没有被推导出为 initializer_list? - why this variable isn't deduced as initializer_list in g++ in C++14? g ++是否遵循C ++ 14 ISo标准,编译器标志-它们实际上是什么意思? - Have g++ follow C++14 ISo standards, compiler flags - what do they actually mean? MinGW g ++ 4.8.1-4无法识别-std = c ++ 14 - MinGW g++ 4.8.1-4 doesn't recognize -std=c++14 继承模板化的operator = in C ++ 14:与g ++和clang ++的不同行为 - Inheriting templated operator= in C++14: different behaviour with g++ and clang++ C ++朋友函数模板重载和SFINAE在clang ++,g ++,vc ++中的不同行为(C ++ 14模式) - C++ friend function template overloading and SFINAE different behaviors in clang++, g++, vc++ (C++14 mode)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM