From 5182283649b87ecf1e1daeaff62edeb3d92fee8c Mon Sep 17 00:00:00 2001
From: Dave Abrahams T
or nil_t
.
Using the Boost.Variant library, this model can be implemented
in terms of boost::variant<T,nil_t>
.
- There is precedence for a discriminated union as a model for an optional value: the
+ There is precedent for a discriminated union as a model for an optional value: the
Haskell Maybe built-in type constructor.
Thus, a discriminated union T+nil_t
serves as a conceptual foundation.
A variant<T,nil_t>
follows naturally from the traditional idiom of extending
@@ -1611,4 +1611,4 @@ the latest version of this file can be found at www.boost.org, and the boost
discussion lists