Workaround for VC++ C2995 via redifining BOOST_SPIRIT_DEFINE macro (#3573)
This commit is contained in:
parent
9f91bb018a
commit
2a2f0bf00a
2 changed files with 28 additions and 1 deletions
|
@ -113,6 +113,33 @@ using feature_context_const_type = x3::with_context<feature_tag,
|
|||
, Context const& context, boost::spirit::x3::unused_type const& ); \
|
||||
/***/
|
||||
|
||||
|
||||
|
||||
#ifdef _WINDOWS
|
||||
|
||||
// VC++ C2995 fix
|
||||
#undef BOOST_SPIRIT_DEFINE_
|
||||
#undef BOOST_SPIRIT_DEFINE
|
||||
|
||||
#define BOOST_SPIRIT_DEFINE_(r, data, rule_name) \
|
||||
using BOOST_PP_CAT(rule_name, _synonym) = decltype(rule_name); \
|
||||
template <typename Iterator, typename Context, typename Attribute> \
|
||||
inline bool parse_rule( \
|
||||
BOOST_PP_CAT(rule_name, _synonym) rule_ \
|
||||
, Iterator& first, Iterator const& last \
|
||||
, Context const& context, Attribute& attr) \
|
||||
{ \
|
||||
using boost::spirit::x3::unused; \
|
||||
static auto const def_ = (rule_name = BOOST_PP_CAT(rule_name, _def)); \
|
||||
return def_.parse(first, last, context, unused, attr); \
|
||||
} \
|
||||
/***/
|
||||
|
||||
#define BOOST_SPIRIT_DEFINE(...) BOOST_PP_SEQ_FOR_EACH( \
|
||||
BOOST_SPIRIT_DEFINE_, _, BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)) \
|
||||
/***/
|
||||
#endif
|
||||
|
||||
}}}
|
||||
|
||||
#endif // MAPNIK_JSON_GRAMMAR_CONFIG_HPP
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <mapnik/util/file_io.hpp>
|
||||
#include <mapnik/util/utf_conv_win.hpp>
|
||||
#include <mapnik/util/dasharray_parser.hpp>
|
||||
|
||||
#include <mapnik/json/json_grammar_config.hpp>
|
||||
#pragma GCC diagnostic push
|
||||
#include <mapnik/warning_ignore_agg.hpp>
|
||||
#include "agg_ellipse.h"
|
||||
|
|
Loading…
Reference in a new issue