Revert "mapnik::variant - use std::tuple<Typess...> instead of mpl::vector<Types...> and remove Boost.MPL dependency"

This reverts commit 6613222b84.
This commit is contained in:
Dane Springmeyer 2016-08-22 11:40:06 -07:00
parent 4dae4d43c5
commit b6cc48fd40
2 changed files with 17 additions and 2 deletions

View file

@ -52,4 +52,18 @@
#define PROJ_ENVELOPE_POINTS 20
#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#ifndef BOOST_MPL_LIMIT_VECTOR_SIZE
#define BOOST_MPL_LIMIT_VECTOR_SIZE 30
#else
#warning "WARNING: BOOST_MPL_LIMIT_VECTOR_SIZE is already defined. Ensure config.hpp is included before any Boost headers"
#endif
#ifndef BOOST_MPL_LIMIT_LIST_SIZE
#define BOOST_MPL_LIMIT_LIST_SIZE 30
#else
#warning "WARNING: BOOST_MPL_LIMIT_LIST_SIZE is already defined. Ensure config.hpp is included before any Boost headers"
#endif
#endif // MAPNIK_CONFIG_HPP

View file

@ -28,7 +28,7 @@
#pragma GCC diagnostic push
#include <mapnik/warning_ignore.hpp>
#include <boost/fusion/adapted/std_tuple.hpp> // spirit support
#include <boost/mpl/vector.hpp> // spirit support
#pragma GCC diagnostic pop
namespace mapnik { namespace util {
@ -36,13 +36,14 @@ namespace mapnik { namespace util {
template <typename T>
using recursive_wrapper = typename mapbox::util::recursive_wrapper<T>;
template<typename... Types>
class variant : public mapbox::util::variant<Types...>
{
public:
// tell spirit that this is an adapted variant
struct adapted_variant_tag;
using types = std::tuple<Types...>;
using types = boost::mpl::vector<Types...>;
// inherit ctor's
using mapbox::util::variant<Types...>::variant;
};