On Tue, Dec 19, 2017 at 1:52 PM Michael William Dodge <mdo...@pivotal.io> wrote:
> Of those, #1 seems better than #2 and #3. Is there an elegant way to use a > sentinel value of std::string to represent null, e.g., static const > PdxReader::NULL_STRING = <magic happens here>? > I am absolutely opposed to sentinel values just from the standpoint that once you pick a value someone will want that value. The C++17 solution to this problem is std::optional<std::string>, but unfortunately C++11 is our minimum. We could embrace boost::optional (for which C++17 std::optional derives), but this will cause clients to also depend on boost, which isn't ideal. We could roll our own optional... -Jake