If I do this:
// In header
class Foo {
void foo(bar*);
};
// In cpp
void Foo::foo(bar* const pBar) {
//Stuff
}
The compiler does not comp
This is simpler to understand with a variable type other than a pointer. For example, you can have the following function declaration:
void foo( int i );
The definition can look like this:
void foo( const int i ) { ... }
Whether the variable 'i' is const or not on the definition side is an implementation detail. It has no impact for the clients of that function.