[Bug c++/78462] feature request: need function default arguments

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Nov 22 07:43:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78462

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
That is:
#include <string>
const std::string test="wish";//global var or const, but const gives me
headaches
int a(int b, int wish1=2, const std::string wish2=test) {
}


Works just fine in C++ and always has.


More information about the Gcc-bugs mailing list