
It seems like different Boost libraries use different nullable types. * Optional uses boost::none * Tribool uses boost::logic::indeterminate_keyword_t * Tuple uses boost::tuples::null_type * Variant uses boost::blank And there are possibly more. What are your opinions about unifying these?

Though there is some difference between null and void, MPL provides a void
type. http://www.boost.org/doc/libs/1_54_0/libs/mpl/doc/refmanual/void.html
I think there may also be some type "na" or something to that effect used
to fill empty elements of a sequence to work around the lack of variadic
templates in C++03, but I couldn't find the exact reference in a cursory
search.
Cheers!
Andrew Hundt
On Sat, Jul 13, 2013 at 7:56 AM, Bjorn Reese
It seems like different Boost libraries use different nullable types.
* Optional uses boost::none * Tribool uses boost::logic::indeterminate_**keyword_t * Tuple uses boost::tuples::null_type * Variant uses boost::blank
And there are possibly more.
What are your opinions about unifying these?
______________________________**_________________ Unsubscribe & other changes: http://lists.boost.org/** mailman/listinfo.cgi/boosthttp://lists.boost.org/mailman/listinfo.cgi/boost

The std::optional proposed for C++14 uses std::nullopt and it was purposely
kept separate from any other nulls because of implicit conversion.
If you put a tribool into a optional then set it to some_common_null, are
you setting the optional to null/disengaged or setting the tribool to
indeterminate (and the optional is thus engaged).
ie:
optional<tribool> op = some_null;
Sure an optional tribool is odd (in effect a quadbool) but probably will
happen somewhere, and not obvious if it happens in templates...
Tony
Sent from my portable Analytical Engine
------------------------------
*From:* "Bjorn Reese"

On 13-07-2013 13:56, Bjorn Reese wrote:
It seems like different Boost libraries use different nullable types.
* Optional uses boost::none * Tribool uses boost::logic::indeterminate_keyword_t * Tuple uses boost::tuples::null_type * Variant uses boost::blank
And there are possibly more.
boost::nullable<T> from Boost.PtrContainer. -Thorsten
participants (4)
-
Andrew Hundt
-
Bjorn Reese
-
Gottlob Frege
-
Thorsten Ottosen