c++ - Is auto as a parameter in a regular function a GCC 4.9 extension? -


gcc 4.9 allows following code, gcc 4.8 , clang 3.5.0 reject it.

void foo(auto c) {     std::cout << c.c_str(); } 

i warning: iso c++ forbids use of 'auto' in parameter declaration [-wpedantic] in 4.9 in 4.8 , clang error: parameter declared 'auto'.

yes, extension. it's added c++17 part of 'concepts' proposal, believe.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -