Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6974: boost::optional compilation error with boost::function and boost::fusion::vector
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-16 00:37:29
#6974: boost::optional compilation error with boost::function and
boost::fusion::vector
------------------------------------------------------------+---------------
Reporter: Jonathan Jones <jonathan.jones@â¦> | Owner: fcacciola
Type: Bugs | Status: new
Milestone: To Be Determined | Component: optional
Version: Boost 1.49.0 | Severity: Problem
Resolution: | Keywords:
------------------------------------------------------------+---------------
Comment (by steven_watanabe):
I'm not quite sure where the best place to fix this is.
- is_convertible should never fail, but it's probably not feasible to fix
it.
- fusion::vector1 shouldn't cause overload resolution to fail, but I don't
see any way to avoid this problem, given the limitations of
is_convertible.
- I could create a special case for is_convertible for boost::function,
but it would be wrong in some edge cases that a compiler intrinsic (or
perhaps a C++11 implementation) would be able to get right.
- That leaves making the copy constructor of optional_base public. This
ignores the underlying problem that external code is making assumptions
about what it can do with an arbitrary type. I really hate to hack the
code like this when it isn't the source of the problem.
- And of course the final option is to modify the constructors so that
optional_base is never passed to a function that requires overload
resolution against T. This one is out because it's too messy.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6974#comment:3> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC