C1817: Parameter cannot be converted to non-constant reference

[ERROR]

Description

A constant argument was specified for calling a function with a reference parameter to a non-constant.

Example
  void f(const int &);  // ok

  
  void f(int &); // causes error, when calling

  
                 // with constant argument

  
  void main() {

  
    f(3);    // error for second function declaration

  
  }

  
Tips

The parameter must be a reference to a constant, or pass a non-constant variable as argument.