Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is this a bug in g++ c++14 support?

Tags:

c++

g++

c++14

It seems that with auto parameters g++ just uses first auto it encounters. Is this a bug?

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

http://ideone.com/T69ytm

like image 228
justanothercoder Avatar asked Mar 08 '16 19:03

justanothercoder


1 Answers

As stated by @SergeyA, this is a GCC bug. std::vector<auto> should not have been accepted.

like image 171
pkshultz Avatar answered Oct 06 '22 23:10

pkshultz