
10 Jul
2005
10 Jul
'05
3:05 a.m.
Jost, Andrew wrote:
This is my first post to the Boost distribution list, so please feel free to speak up if you find any part of this message to be outside the normal decorum.
I am curious if there is support for what I'm calling a "dual_state" template class. Anyone familiar with Perl will instantly recognize the parallel. The idea is to attach a "statedness" value to arbitrary objects, allowing us to consider them defined or undefined. Newly constructed dual_state objects are undefined. For example,
It sounds like the functionality you want is provided by Boost.Optional: http://www.boost.org/libs/optional/doc/optional.html (And yes, it is extremely useful ;-) ) Jonathan