const string&
'P' is not an appropriate name for  the function.
I still think there should be a better way, maybe something inside 'base' ?
Otherwise let's use cout even though it is not due to Chromium code style, we should not be dogmatic :)