Default parameter when passing by reference

It is not possible unless the value is const. Example

void func(const int &x = 3){
}

int main () {

    func();

    return 0;
}
Advertisements