Boost logo

Boost :

From: Jody Hagins (jody-boost-011304_at_[hidden])
Date: 2005-02-24 11:19:40


On Thu, 24 Feb 2005 12:57:51 -0300
"Fernando Cacciola" <fernando_cacciola_at_[hidden]> wrote:

> Hi people,
>
> In the users mailing list, Yuval Ronen pointed out that optional<>
> uses a type "detail::none_t", documented as such, thus prompting
> people to use a type in a namesapece which is supposed to be hidden to
> end users. A straightforward fix is to just move "none_t" out of the
> detail namespace directlty into boost.
> However, this little change introduces a new type in the (main) boost
> namespace, so before I do that I want to make sure it won't have any
> undesired impact.
>
> If you see any reason for not doing this (putting "none_t" right there
> in boost) please speak now.
>
> If no one objects, I'll do it.

What is wrong with using the "none" instance, ala...

#include <boost/optional.hpp>
#include <boost/none.hpp>

int main(int, char *[])
{
  boost::optional<int> x(boost::none);
  return 0;
}


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk