Is it good practice to use assert() is class mutators?
- by cactusbin
For example:
void Date::month(unsigned int inMonth) {
assert(inMonth <= 12);
_month = inMonth;
}
If this is not good practice, what is the correct way to go about this?