[Boost-bugs] [Boost C++ Libraries] #10156: Error with count_if on QNX

Subject: [Boost-bugs] [Boost C++ Libraries] #10156: Error with count_if on QNX
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-06-26 21:14:51


#10156: Error with count_if on QNX
-----------------------------------------+---------------------------
 Reporter: Niklas Angare <li51ckf02@…> | Owner: ramey
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: serialization
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-----------------------------------------+---------------------------
 Some of the tests, including test_list_ptrs_binary_archive,
 test_list_ptrs_text_archive and test_list_xml_archive, fail on QNX 6.5.0
 with the following error:

> ../boost/serialization/forward_list.hpp:55: error: no matching function
 for call to 'count_if(std::_Fwd_list_const_iterator<A*, std::allocator<A*>
>, std::_Fwd_list_const_iterator<A*, std::allocator<A*> >,
 boost::serialization::save(Archive&, const std::forward_list<U,
 Allocator>&, unsigned int) [with Archive =
 boost::archive::binary_oarchive, U = A*, Allocator =
 std::allocator<A*>]::predicate)'

 I don't know the reason for this error. Replacing the predicate functor
 with a function solves it but isn't very elegant. However a more
 straightforward way to count the number of elements in a range is to use
 std::distance() instead of std::count_if(). The attached patch implements
 this change. The above-mentioned tests pass with the patch.

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