class foo{
void bar(const long var_name);
};
void foo::bar(long var_name){
}
Since it's declared const in the class, shouldn't the member definition need to be const as well I understand that from a code generation point of view it may be irrelevant, but it strikes me that seeing this would mean that the coder made a mistake since and would have intended for them to agree.

Shouldn't this generate a warning? (const, non-const)
CMCFelix
Bart1
I agree it is confusing. And it causes things to be thought well but done worse (hope this makes sense with my poor english).
From my point of view if should be worth a level 4 warning.
Just start a suggestions in
http://lab.msdn.microsoft.com/productfeedback/Default.aspx
A kid
Actually I never said it was an error, I was wondering if people agreed that it would be good if a warning were generated for that situation. As I said in my first post, I understand why it isn't an error and why it shouldn't be. But I think that code like that should generate a warning for the same reason as assigning within an if; it's legal code, but it's likely the user didn't mean to do what they did.
Do other people agree