Didn't play well with VS2017, reverting "re-use lamdas definitions and aviod duplicate symbols when building with vs2017"

This reverts commit 4c9322bc0d.
This commit is contained in:
artemp 2017-07-06 11:17:14 +02:00
parent 631c0a59c4
commit e08616aed3
3 changed files with 26 additions and 16 deletions

View file

@ -164,6 +164,15 @@ struct geometry_type_ : x3::symbols<mapnik::geometry::geometry_types>
}
} geometry_type_symbols;
auto assign_name = [](auto const& ctx)
{
std::get<0>(_val(ctx)) = std::move(_attr(ctx));
};
auto assign_value = [](auto const& ctx)
{
std::get<1>(_val(ctx)) = std::move(_attr(ctx));
};
auto const assign_geometry_type = [] (auto const& ctx)
{
std::get<0>(_val(ctx)) = _attr(ctx);
@ -254,7 +263,7 @@ auto const geometry_tuple_def = (geometry_type[assign_geometry_type]
(omit[geojson_string] > lit(':') > omit[value])) % lit(',');
auto const property_def = geojson_string[assign_key] > lit(':') > value[assign_value];
auto const property_def = geojson_string[assign_name] > lit(':') > value[assign_value];
auto const properties_def = property[assign_property] % lit(',');

View file

@ -43,21 +43,6 @@ BOOST_SPIRIT_DECLARE(generic_json_grammar_type);
BOOST_SPIRIT_DECLARE(generic_json_key_value_type);
}
auto assign = [](auto const& ctx)
{
_val(ctx) = _attr(ctx);
};
auto assign_key = [](auto const& ctx)
{
std::get<0>(_val(ctx)) = _attr(ctx);
};
auto assign_value = [](auto const& ctx)
{
std::get<1>(_val(ctx)) = std::move(_attr(ctx));
};
grammar::generic_json_grammar_type const& generic_json_grammar();
grammar::generic_json_key_value_type const& generic_json_key_value();

View file

@ -46,6 +46,22 @@ auto make_false = [] (auto const& ctx)
_val(ctx) = false;
};
auto assign = [](auto const& ctx)
{
_val(ctx) = _attr(ctx);
};
auto assign_key = [](auto const& ctx)
{
std::get<0>(_val(ctx)) = _attr(ctx);
};
auto assign_value = [](auto const& ctx)
{
std::get<1>(_val(ctx)) = _attr(ctx);
};
using x3::lit;
using x3::string;
// exported rules