From 1b7002f663d1e22bf8da545e7859c5107706c840 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
@@ -1673,4 +1673,4 @@ License, Version 1.0. (See accompanying file
the latest version of this file can be found at www.boost.org, and the boost discussion lists