Is this a bug in g ++ C ++ 14?

It seems that with auto options, g ++ just uses the first auto it encounters. This is mistake?

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

http://ideone.com/T69ytm

+7
c ++ g ++ c ++ 14
source share
1 answer

As @SergeyA pointed out, this is a GCC bug. std::vector<auto> should not be accepted.

+2
source share

All Articles