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

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

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -