Boost logo

Boost :

Subject: Re: [boost] [optional] Types without assignment operator
From: Adam Badura (abadura_at_[hidden])
Date: 2012-11-14 07:17:02


> In-place factories are not intrusive, you can in-place construct value
> of any type, as long as it has the necessary constructor. The
> description is available here:
>
> http://www.boost.org/doc/libs/release/libs/optional/doc/html/boost_optional/in_place_factories.html

OK, I was wrong here. It is intrusive regarding boost::optional (it has to
have those extra constructors and assignments) and not my embedded type.
Should have looked at that closer before writing.

But it doesn't really change things because as I showed in example in a
reply to "Andrzej Krzemienski" the construction is non-trivial in the sense
that it is not just a call to constructor but also other operations.

On the other hand I could do those other operations in getValue() function
just after assigning to m_value. And that would solve the issue. In a rather
convoluted way but maybe this is too subjective to be a matter here.

And since those missing links are a documentation bug should I report it
somehow? How? Where?

Adam Badura


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