Opened 4 years ago

Last modified 4 years ago

#10368 new Bugs

Boost.Ref: undocumented breaking change: void cref(const T&&) = delete

Reported by: Geurt Vos <geurt.vos@…> Owned by: Peter Dimov
Milestone: To Be Determined Component: bind
Version: Boost 1.56.0 Severity: Problem
Keywords: Cc:


Boost 1.56.0 adds 'template <class T> void cref(T const&&) = delete' which is an undocumented addition and breaks code like:

std::find_if(..., ..., boost::cref( some_predicate(...) ) );

Change History (2)

comment:1 Changed 4 years ago by viboes

Component: Nonebind
Owner: set to Peter Dimov

comment:2 Changed 4 years ago by Peter Dimov

It's true that this change breaks some valid code. It has been added to match C++11, which does contain this overload. It's possible that this wasn't the right decision, but C++11's std::cref would not work with the above code, so I'm not sure what we need to do here.

Note: See TracTickets for help on using tickets.