4 ms·
Google C++ guide says to put mutable parameters last, but I've seen other style guides say the opposite.
by lupire 2y ago
Google C++ guide says to put mutable parameters last, but I've seen other style guides say the opposite.
- wakawaka28 2y agoIf your mutable thing is mandatory, then I think it should go first. Otherwise, you will be in a strange position when there are default arguments. The mutable thing would then be sandwiched between immutables. Of course if your mutable parameter is optional, it must be after all the required parameters. The argument above applies neatly to assembly instructions, which generally change one thing.