+ wrap xml_attribute.value into std::string to avoid crashes

when linking to libc++ on os x (TODO)
This commit is contained in:
artemp 2013-01-15 14:14:47 +00:00
parent e8cc64a9a7
commit 96857ca291

View file

@ -402,7 +402,7 @@ boost::optional<T> xml_node::get_opt_attr(std::string const& name) const
std::map<std::string, xml_attribute>::const_iterator itr = attributes_.find(name);
if (itr == attributes_.end()) return boost::optional<T>();
itr->second.processed = true;
boost::optional<T> result = fast_cast<T>(tree_, itr->second.value);
boost::optional<T> result = fast_cast<T>(tree_, std::string(itr->second.value));
if (!result)
{
throw config_error(std::string("Failed to parse attribute '") +