How to teach abc_or_default what the default is

Jan 17, 2015 at 1:56 AM
For example, if I am transforming and projecting some pointers, how does the library know that it should deal with a pointer and return, presumably, nullptr? Or how do I teach it otherwise what the default is that I want to prefer?
Coordinator
Jan 17, 2015 at 9:53 AM
IIRC uses T() to as default value which for pointers is 0.

I have considered making a an overload that allows custom default value but haven't got to it yet.
Jan 17, 2015 at 12:36 PM
Great! It's a nice to have feature.

I didn't want to assume, but that sounds like a reasonable default one might expect.

Thanks...