Boost logo

Boost :

From: Gavin Lambert (boost_at_[hidden])
Date: 2019-12-03 22:30:02

On 4/12/2019 09:50, Artyom Beilis wrote:
> I think if input is nullptr than output can be nullptr as well.

Mostly this, when both sides are pointers.

If one is a string type, so that you can't represent nullptr, then
there's a couple of choices:

1. Use optional<string> so that you can explicitly represent the null
state. This also acts as a hint to the user that the method has some
special handling for the null case.

2. Treat an empty string as equivalent to nullptr. This would usually
be safe (an empty filename is usually illegal, although an empty
directory name is not).

Either way will probably require conditional logic to bypass the normal

Boost list run by bdawes at, gregod at, cpdaniel at, john at