use c++11 features over boost when available

This commit is contained in:
artemp 2014-10-02 15:09:17 +01:00
parent 667b6e3adc
commit a04276d90a

View file

@ -26,12 +26,12 @@
// boost
#include <boost/spirit/include/qi.hpp>
#include <boost/bind.hpp>
// stl
#include <algorithm>
#include <cctype>
#include <sstream>
#include <functional>
namespace mapnik
{
@ -56,9 +56,10 @@ void font_feature_settings::from_string(std::string const& features)
qi::as_string_type as_string;
// Call correct overload.
using std::placeholders::_1;
void (font_feature_settings::*append)(std::string const&) = &font_feature_settings::append;
if (!qi::parse(features.begin(), features.end(), as_string[+(char_ - ',')][boost::bind(append, this, ::_1)] % ','))
if (!qi::parse(features.begin(), features.end(), as_string[+(char_ - ',')][std::bind(append, this, _1)] % ','))
{
throw config_error("failed to parse font-feature-settings: '" + features + "'");
}
@ -98,4 +99,3 @@ void font_feature_settings::append(std::string const& feature)
}
}