Subject: [Boost-bugs] [Boost C++ Libraries] #12646: Compilation error when using a property type other than int with property_merge_45
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-12-04 05:12:28
#12646: Compilation error when using a property type other than int with
property_merge_45
---------------------------------------------+----------------------
Reporter: Charles A Cornell <cacornell@â¦> | Owner: ljsimons
Type: Bugs | Status: new
Milestone: To Be Determined | Component: polygon
Version: Boost 1.62.0 | Severity: Problem
Keywords: |
---------------------------------------------+----------------------
The following usage of property merge leads to compilation errors:
property_merge_45<int,string> pm;
The issue is simple to correct. I was able to get the following to
compile and function as expected by making a one line edit to
polygon/detail/property_merge_45.hpp. I modified line 34 in class
CountMerge to be:
typename std::vector<std::pair<property_type, int> >::iterator itr =
lower_bound(counts.begin(), counts.end(), std::make_pair(index, int(0)));
instead of:
std::vector<std::pair<int, int> >::iterator itr =
lower_bound(counts.begin(), counts.end(), std::make_pair(index, int(0)));
which make it consistent with the declaration in class CountMerge:
std::vector<std::pair<property_type, int> > counts;
-Charles
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12646> 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:20 UTC