Subject: [Boost-bugs] [Boost C++ Libraries] #7763: Boost.Parameter functions no longer accept non-moveable types as arguments
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-12-04 04:00:23
#7763: Boost.Parameter functions no longer accept non-moveable types as arguments
-------------------------------------------------------+--------------------
Reporter: John Bytheway <jbytheway+boost@â¦> | Owner: danielw
Type: Bugs | Status: new
Milestone: To Be Determined | Component: parameter
Version: Boost 1.52.0 | Severity: Regression
Keywords: |
-------------------------------------------------------+--------------------
Boost.Parameter suffered a regression because of a change to the semantics
of boost::is_convertible. It used to be possible to pass a non-movable
type to a Boost.Parameter function, but that no longer works as of Boost
1.47 (at least on certain compilers; gcc continued to work for some more
Boost versions but doesn't in 1.52).
The issue with is_convertible was discussed in more detail in this thread:
http://boost.2283326.n4.nabble.com/type-traits-parameter-Inconsistent-
boost-is-convertible-between-gcc-and-clang-td4634162.html
It first manifested in clang, but now also appears in gcc thanks to the
bugfix discussed that thread.
I attach an example demonstrating the problem.
I have worked around the problem locally by editing
boost/parameter/preprocessor.hpp and changing
typedef is_convertible<mpl::_, Target> type;
to
typedef is_convertible<mpl::_, const Target&> type;
I make no claim that this is exactly the correct fix, but I believe
something along these lines is required.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7763> 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:11 UTC