I want to intercept the operator << inside a namespace to add some additional formatting to basic types before printing them out. Can this be done?
namespace Foo {
std::ostream& operator<<(std::ostream& os, bool b) {
//Can I call std::operator<< here now. Something like:
// os std::<< (b ? 10 : -10) << std::endl;
}
}
Thanks!