[range] Conflict with string algorithms
I noticed there is a conflict between boost range and the string
algorithm header files. There may be others, but the specific one I was
dealing with was boost::find.
For example, the following code results in an ambiguous warning. This is
because boost::find is defined both in algorithm/string/find.hpp and
range/algorithm/find.hpp.
#include <vector>
#include
On 29/03/2019 08:00, Bill Buklis wrote:
I noticed there is a conflict between boost range and the string algorithm header files. There may be others, but the specific one I was dealing with was boost::find.
For example, the following code results in an ambiguous warning. This is because boost::find is defined both in algorithm/string/find.hpp and range/algorithm/find.hpp.
#include <vector> #include
#include int main() { std::vector<int> vec; boost::find(vec, 3); }
You can disambiguate it by using boost::range::find or boost::algorithm::find instead.
participants (2)
-
Bill Buklis
-
Gavin Lambert