Opened 6 years ago

#12646 new Bugs

Compilation error when using a property type other than int with property_merge_45

Reported by: Charles A Cornell <cacornell@…> Owned by: Lucanus Simonson
Milestone: To Be Determined Component: polygon
Version: Boost 1.62.0 Severity: Problem
Keywords: Cc:

Description

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

Change History (0)

Note: See TracTickets for help on using tickets.