Opened 6 years ago

#12466 new Bugs

property_tree::string_path<StringT, TranslatorT>'s operator / won't accept StringT as an argument

Reported by: LRFLEW <LRFLEW.Coll@…> Owned by: Sebastian Redl
Milestone: To Be Determined Component: property_tree
Version: Boost 1.61.0 Severity: Problem
Keywords: Cc:

Description

A very simple example of the problem can be seen with this code:

boost::property_tree::path_of<std::string>::type path("parent");
std::string component("child");
path / component;

This produces an error of "no match for operator/". I have tested this on G++ 6.2.0, VS 14 Update 3, and Apple's clang-800.0.38, and they all produce roughly the same error. This issue can be worked around by replacing the third line with path / boost::property_tree::path_of<std::string>::type(component) or path / component.c_str();, as those types are both explicitly overloaded. Adding an additional overload for the String type will fix this issue.

Change History (0)

Note: See TracTickets for help on using tickets.