rely on implicit std::reference_wrapper<T> -> T conversions (thanks @lightmare)

This commit is contained in:
Artem Pavlenko 2018-07-23 13:26:22 +01:00
parent 93d0eea8af
commit 5eca7731e9
3 changed files with 1 additions and 29 deletions

View file

@ -73,11 +73,7 @@ namespace mapnik { namespace grammar {
template <typename Context>
inline mapnik::transcoder const& extract_transcoder(Context const& ctx)
{
#if BOOST_VERSION >= 106700
return x3::get<transcoder_tag>(ctx);
#else
return x3::get<transcoder_tag>(ctx).get();
#endif
}
auto append = [](auto const& ctx)

View file

@ -34,7 +34,6 @@
namespace mapnik { namespace svg { namespace grammar {
namespace x3 = boost::spirit::x3;
using x3::lit;
@ -44,8 +43,6 @@ using x3::no_case;
using coord_type = std::tuple<double,double>;
#if BOOST_VERSION >= 106700
template <typename Context>
svg_converter_type & extract_path(Context const& ctx)
{
@ -58,19 +55,6 @@ bool & extract_relative(Context const& ctx)
return x3::get<relative_tag>(ctx);
}
#else
template <typename Context>
svg_converter_type & extract_path(Context const& ctx)
{
return x3::get<svg_path_tag>(ctx).get();
}
template <typename Context>
bool & extract_relative(Context const& ctx)
{
return x3::get<relative_tag>(ctx).get();
}
#endif
auto const move_to = [] (auto const& ctx)
{
extract_path(ctx).move_to(std::get<0>(_attr(ctx)), std::get<1>(_attr(ctx)), x3::get<relative_tag>(ctx));

View file

@ -44,19 +44,11 @@ using x3::lit;
using x3::double_;
using x3::no_case;
#if BOOST_VERSION >= 106700
template <typename Context>
auto & extract_transform(Context const& ctx)
agg::trans_affine & extract_transform(Context const& ctx)
{
return x3::get<svg_transform_tag>(ctx);
}
#else
template <typename Context>
auto & extract_transform(Context const& ctx)
{
return x3::get<svg_transform_tag>(ctx).get();
}
#endif
auto const matrix_action = [] (auto const& ctx)
{