Boost logo

Boost :

Subject: Re: [boost] [Modularization][optional][functional] boost::none - what do we want it to be?
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2014-09-30 09:40:45


2014-09-30 9:55 GMT+02:00 Andrey Semashev <andrey.semashev_at_[hidden]>:

> On Mon, Sep 29, 2014 at 8:49 PM, Andrzej Krzemienski <akrzemi1_at_[hidden]>
> wrote:
> > Hi Everyone,
> > I know it may be premature to to think about removing every cycle in
> Boost,
> > but while looking at the cycle reports I found that at least one library
> is
> > using boost::none, for a purpose different than indicating an
> uninitialized
> > boost::optional. It is in Boost.Functional:
> >
> >
> https://github.com/boostorg/functional/blob/master/include/boost/functional/factory.hpp
> >
> > It uses none_t as a default type for a template type parameter Allocator.
> >
> > My question is: what do we want boost::none_t to indicate, at least in
> > Boost?
> > 1. A value-semantic alternative to void, that anyone can use?
> > 2. A tag indicating boost::optional<T> without a value?
> >
> > The answer to this question dictates how we should untie the cycle. I
> know
> > it is too soon to care about small cycles right now, but my question is
> > more about "the principles".
>
> In my view that use of none_t is not justified. I'm not sure if it can
> be safely replaced with something different to remove the dependency,
> but I think it should be done, even if it means breaking some code.
>

Ok, I created two pull requests. They do not break unit tests at least.
https://github.com/boostorg/functional/pull/1
https://github.com/boostorg/functional/pull/2

Regards,
&rzej


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