Does it makes sense to use the const
qualifier for input parameters in C++
when the parameter is passed by value ?
For example if I pass a primitive type like integer
:
void function( const int aValue );
does it gain any benefit over the same function without using the const
:
void function( int aValue );
Is there any difference if I pass my own data type ?
void function( Data aData );
void function( const Data aData );