diff --git a/include/mapnik/css_color_grammar_x3_def.hpp b/include/mapnik/css_color_grammar_x3_def.hpp index 457f0d999..d163c8f7d 100644 --- a/include/mapnik/css_color_grammar_x3_def.hpp +++ b/include/mapnik/css_color_grammar_x3_def.hpp @@ -28,7 +28,7 @@ #include #include #include - +#include #pragma GCC diagnostic push #include #include diff --git a/include/mapnik/csv/csv_grammar_x3_def.hpp b/include/mapnik/csv/csv_grammar_x3_def.hpp index b40507030..23eaeef26 100644 --- a/include/mapnik/csv/csv_grammar_x3_def.hpp +++ b/include/mapnik/csv/csv_grammar_x3_def.hpp @@ -20,6 +20,7 @@ * *****************************************************************************/ +#include #pragma GCC diagnostic push #include #include diff --git a/include/mapnik/expression_grammar_x3_def.hpp b/include/mapnik/expression_grammar_x3_def.hpp index 6c25b4812..84d29bc5f 100644 --- a/include/mapnik/expression_grammar_x3_def.hpp +++ b/include/mapnik/expression_grammar_x3_def.hpp @@ -23,6 +23,7 @@ #ifndef MAPNIK_EXPRESSIONS_GRAMMAR_X3_DEF_HPP #define MAPNIK_EXPRESSIONS_GRAMMAR_X3_DEF_HPP +#include #include #include #include diff --git a/include/mapnik/image_filter_grammar_x3_def.hpp b/include/mapnik/image_filter_grammar_x3_def.hpp index b40bfc8f9..bb4def992 100644 --- a/include/mapnik/image_filter_grammar_x3_def.hpp +++ b/include/mapnik/image_filter_grammar_x3_def.hpp @@ -23,10 +23,10 @@ #ifndef MAPNIK_IMAGE_FILTER_GRAMMAR_X3_DEF_HPP #define MAPNIK_IMAGE_FILTER_GRAMMAR_X3_DEF_HPP - #include #include #include +#include #pragma GCC diagnostic push #include diff --git a/include/mapnik/json/feature_grammar_x3_def.hpp b/include/mapnik/json/feature_grammar_x3_def.hpp index 1e18faeec..fa2925fbd 100644 --- a/include/mapnik/json/feature_grammar_x3_def.hpp +++ b/include/mapnik/json/feature_grammar_x3_def.hpp @@ -32,6 +32,7 @@ #include #include +#include #include #include diff --git a/include/mapnik/json/generic_json_grammar_x3_def.hpp b/include/mapnik/json/generic_json_grammar_x3_def.hpp index 64570eeb1..3d870343a 100644 --- a/include/mapnik/json/generic_json_grammar_x3_def.hpp +++ b/include/mapnik/json/generic_json_grammar_x3_def.hpp @@ -26,6 +26,7 @@ #include #include #include +#include namespace mapnik { namespace json { namespace grammar { diff --git a/include/mapnik/json/geojson_grammar_x3_def.hpp b/include/mapnik/json/geojson_grammar_x3_def.hpp index 10dd81aab..8c7b43b7d 100644 --- a/include/mapnik/json/geojson_grammar_x3_def.hpp +++ b/include/mapnik/json/geojson_grammar_x3_def.hpp @@ -27,6 +27,7 @@ #include #include #include +#include #include namespace mapnik { namespace json { namespace grammar { diff --git a/include/mapnik/json/json_grammar_config.hpp b/include/mapnik/json/json_grammar_config.hpp index d055ee959..3e5c55616 100644 --- a/include/mapnik/json/json_grammar_config.hpp +++ b/include/mapnik/json/json_grammar_config.hpp @@ -129,33 +129,6 @@ using feature_context_const_type = x3::with_context \ - 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 diff --git a/include/mapnik/json/positions_grammar_x3_def.hpp b/include/mapnik/json/positions_grammar_x3_def.hpp index ab012c061..4fd14db13 100644 --- a/include/mapnik/json/positions_grammar_x3_def.hpp +++ b/include/mapnik/json/positions_grammar_x3_def.hpp @@ -25,6 +25,7 @@ #include #include +#include namespace mapnik { namespace json { namespace grammar { diff --git a/include/mapnik/json/unicode_string_grammar_x3_def.hpp b/include/mapnik/json/unicode_string_grammar_x3_def.hpp index d58293cf3..f0a974a50 100644 --- a/include/mapnik/json/unicode_string_grammar_x3_def.hpp +++ b/include/mapnik/json/unicode_string_grammar_x3_def.hpp @@ -24,6 +24,7 @@ #define MAPNIK_JSON_UNICODE_STRING_GRAMMAR_X3_DEF_HPP #include +#include #include namespace mapnik { namespace json { namespace grammar { diff --git a/include/mapnik/path_expression_grammar_x3_def.hpp b/include/mapnik/path_expression_grammar_x3_def.hpp index 324e44e35..a6d5023c0 100644 --- a/include/mapnik/path_expression_grammar_x3_def.hpp +++ b/include/mapnik/path_expression_grammar_x3_def.hpp @@ -25,6 +25,7 @@ // mapnik #include #include +#include namespace mapnik { namespace grammar { diff --git a/include/mapnik/transform_expression_grammar_x3_def.hpp b/include/mapnik/transform_expression_grammar_x3_def.hpp index 4af1e9481..7fe96af45 100644 --- a/include/mapnik/transform_expression_grammar_x3_def.hpp +++ b/include/mapnik/transform_expression_grammar_x3_def.hpp @@ -26,6 +26,7 @@ #include #include #include +#include #pragma GCC diagnostic push #include diff --git a/include/mapnik/util/windows_c2995.hpp b/include/mapnik/util/windows_c2995.hpp new file mode 100644 index 000000000..13d5b6f13 --- /dev/null +++ b/include/mapnik/util/windows_c2995.hpp @@ -0,0 +1,51 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2016 Artem Pavlenko + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ + +#ifndef MAPNIK_UTIL_WINDOWS_C2995_HPP +#define MAPNIK_UTIL_WINDOWS_C2995_HPP + +#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 \ + 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_UTIL_WINDOWS_C2995_HPP diff --git a/include/mapnik/wkt/wkt_grammar_x3_def.hpp b/include/mapnik/wkt/wkt_grammar_x3_def.hpp index db44a4ce4..e748ac9c5 100644 --- a/include/mapnik/wkt/wkt_grammar_x3_def.hpp +++ b/include/mapnik/wkt/wkt_grammar_x3_def.hpp @@ -25,7 +25,7 @@ #include #include - +#include #ifdef __GNUC__ // instantiate `is_substitute` for reference T and reference Attribute // fixes gcc6 compilation issue diff --git a/src/image_options.cpp b/src/image_options.cpp index 7494838cf..fcc6f171f 100644 --- a/src/image_options.cpp +++ b/src/image_options.cpp @@ -21,7 +21,7 @@ *****************************************************************************/ #include - +#include #pragma GCC diagnostic push #include #include diff --git a/src/json/extract_bounding_boxes_x3.cpp b/src/json/extract_bounding_boxes_x3.cpp index 8346f1061..467f43deb 100644 --- a/src/json/extract_bounding_boxes_x3.cpp +++ b/src/json/extract_bounding_boxes_x3.cpp @@ -27,6 +27,7 @@ #include #include #include +#include namespace mapnik { namespace json { diff --git a/src/svg/svg_parser.cpp b/src/svg/svg_parser.cpp index 8031fc53c..3bfe4f83e 100644 --- a/src/svg/svg_parser.cpp +++ b/src/svg/svg_parser.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #pragma GCC diagnostic push #include #include "agg_ellipse.h"