[Boost-bugs] [Boost C++ Libraries] #9112: [tr1] Failures in test_ref_wrapper_tricky.cpp

Subject: [Boost-bugs] [Boost C++ Libraries] #9112: [tr1] Failures in test_ref_wrapper_tricky.cpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-13 16:22:40


#9112: [tr1] Failures in test_ref_wrapper_tricky.cpp
---------------------------------------+-------------------------
 Reporter: Petr Machata <pmachata@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: TR1
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
---------------------------------------+-------------------------
 The mentioned test case gives a number of failures. Those can be tracked
 down to two problems (at least the test case perceives them as problems).
 Google gives hits dating this back to 1.37, I have confirmed it with 1.41
 and 1.54. I'm not sure why this hasn't been addressed--have I
 inadvertently opened a can of worms?

 First, reference_wrapper that wraps function-like objects doesn't derive
 off std::unary_function, resp. std::binary function. That's relatively
 easy to fix by introducing a reference_wrapper_base class template, that
 reference_wrapper inherits off. That template optionally derives off
 unary_ or binary_function as appropriate.

 Second, calling reference wrapper as function doesn't work for member
 functions. This can be solved by introducing operator() in the above
 mentioned base class.

 I'll attach a patch that implements the above, except for specializations
 for reference_wrapper<{binary,unary}_function>. Please let me know
 whether a patch to this effect would be applicable and advise on areas
 that need more work.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9112>
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:14 UTC