>>>>> Steinar Bang <s...@dod.no>:

>>>>> Philipp Marek <philipp.ma...@linbit.com>:
>> It might be easier for callers if this did
>> if (isNull)
>> return "";
>> so that the value could just be used in printf() and similar without 
>> explicit checking.

> If that was ok to do, one might as well represent a NULL with an empty
> string.

As I said in a different message in the thread, if you need NULL, I
think returning auto_ptr<string> is the simplest way that is both
standards compliant, won't leak memory, and doesn't force you to handle
object life cycle for the returned strings.

Reply via email to