Since which version of C++ are default arguments allowed?

  • A+
Category:Languages

Example:

void foo(int a,int b=12) { ... } 

Since which version of C++ is this legal? Was it introduced in C++11?

 


This is legal in all standardized versions of C++, starting with C++98.

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: