move make_unique out of std namespace and allow building with c++14 compilers

( -std=c++1y )
This commit is contained in:
artemp 2014-06-12 15:14:05 +01:00
parent d2eca542a9
commit 3ded23fbab
13 changed files with 18 additions and 19 deletions

View file

@ -20,19 +20,19 @@
* *
*****************************************************************************/ *****************************************************************************/
#ifndef MAPNIK_STD_HPP #ifndef MAPNIK_MAKE_UNIQUE_HPP
#define MAPNIK_STD_HPP #define MAPNIK_MAKE_UNIQUE_HPP
#include <memory> #include <memory>
namespace std { namespace mapnik {
// C++14 backfill from http://herbsutter.com/gotw/_102/ // C++14 backfill from http://herbsutter.com/gotw/_102/
template<typename T, typename ...Args> template<typename T, typename ...Args>
inline ::std::unique_ptr<T> make_unique(Args&& ...args) { inline std::unique_ptr<T> make_unique(Args&& ...args) {
return ::std::unique_ptr<T>(new T(::std::forward<Args>(args)...)); return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
} }
} }
#endif #endif // MAPNIK_MAKE_UNIQUE_HPP

View file

@ -24,7 +24,7 @@
#define MAPNIK_GEOMETRY_TO_WKB_HPP #define MAPNIK_GEOMETRY_TO_WKB_HPP
// mapnik // mapnik
#include <mapnik/std.hpp> #include <mapnik/make_unique.hpp>
#include <mapnik/global.hpp> #include <mapnik/global.hpp>
#include <mapnik/geometry.hpp> #include <mapnik/geometry.hpp>

View file

@ -21,7 +21,7 @@
*****************************************************************************/ *****************************************************************************/
// mapnik // mapnik
#include <mapnik/std.hpp> #include <mapnik/make_unique.hpp>
#include <mapnik/global.hpp> #include <mapnik/global.hpp>
#include <mapnik/debug.hpp> #include <mapnik/debug.hpp>
#include <mapnik/image_data.hpp> #include <mapnik/image_data.hpp>

View file

@ -1,4 +1,3 @@
/***************************************************************************** /*****************************************************************************
* *
* This file is part of Mapnik (c++ mapping toolkit) * This file is part of Mapnik (c++ mapping toolkit)
@ -22,7 +21,7 @@
*****************************************************************************/ *****************************************************************************/
// mapnik // mapnik
#include <mapnik/std.hpp> #include <mapnik/make_unique.hpp>
#include <mapnik/geometry.hpp> #include <mapnik/geometry.hpp>
#include <mapnik/feature.hpp> #include <mapnik/feature.hpp>
#include <mapnik/feature_factory.hpp> #include <mapnik/feature_factory.hpp>

View file

@ -31,7 +31,7 @@
// mapnik // mapnik
#include <mapnik/debug.hpp> #include <mapnik/debug.hpp>
#include <mapnik/std.hpp> #include <mapnik/make_unique.hpp>
#include <mapnik/util/fs.hpp> #include <mapnik/util/fs.hpp>
#include <mapnik/global.hpp> #include <mapnik/global.hpp>
#include <mapnik/utils.hpp> #include <mapnik/utils.hpp>

View file

@ -24,7 +24,7 @@
// mapnik // mapnik
#include <mapnik/debug.hpp> #include <mapnik/debug.hpp>
#include <mapnik/std.hpp> #include <mapnik/make_unique.hpp>
#include <mapnik/datasource.hpp> #include <mapnik/datasource.hpp>
#include <mapnik/geom_util.hpp> #include <mapnik/geom_util.hpp>

View file

@ -21,7 +21,7 @@
*****************************************************************************/ *****************************************************************************/
// mapnik // mapnik
#include <mapnik/std.hpp> #include <mapnik/make_unique.hpp>
#include <mapnik/graphics.hpp> #include <mapnik/graphics.hpp>
#include <mapnik/feature.hpp> #include <mapnik/feature.hpp>
#include <mapnik/agg_renderer.hpp> #include <mapnik/agg_renderer.hpp>

View file

@ -23,7 +23,7 @@
#if defined(HAVE_CAIRO) #if defined(HAVE_CAIRO)
// mapnik // mapnik
#include <mapnik/std.hpp> #include <mapnik/make_unique.hpp>
#include <mapnik/rule.hpp> #include <mapnik/rule.hpp>
#include <mapnik/debug.hpp> #include <mapnik/debug.hpp>
#include <mapnik/layer.hpp> #include <mapnik/layer.hpp>

View file

@ -23,7 +23,7 @@
#if defined(GRID_RENDERER) #if defined(GRID_RENDERER)
// mapnik // mapnik
#include <mapnik/std.hpp> #include <mapnik/make_unique.hpp>
#include <mapnik/feature.hpp> #include <mapnik/feature.hpp>
#include <mapnik/grid/grid_rasterizer.hpp> #include <mapnik/grid/grid_rasterizer.hpp>
#include <mapnik/grid/grid_renderer.hpp> #include <mapnik/grid/grid_renderer.hpp>

View file

@ -21,7 +21,7 @@
*****************************************************************************/ *****************************************************************************/
// mapnik // mapnik
#include <mapnik/std.hpp> #include <mapnik/make_unique.hpp>
#include <mapnik/debug.hpp> #include <mapnik/debug.hpp>
#include <mapnik/image_reader.hpp> #include <mapnik/image_reader.hpp>

View file

@ -21,7 +21,7 @@
*****************************************************************************/ *****************************************************************************/
// mapnik // mapnik
#include <mapnik/std.hpp> #include <mapnik/make_unique.hpp>
#include <mapnik/debug.hpp> #include <mapnik/debug.hpp>
#include <mapnik/global.hpp> #include <mapnik/global.hpp>
#include <mapnik/wkb.hpp> #include <mapnik/wkb.hpp>

View file

@ -21,7 +21,7 @@
*****************************************************************************/ *****************************************************************************/
//mapnik //mapnik
#include <mapnik/std.hpp> #include <mapnik/make_unique.hpp>
#include <mapnik/xml_tree.hpp> #include <mapnik/xml_tree.hpp>
#include <mapnik/xml_attribute_cast.hpp> #include <mapnik/xml_attribute_cast.hpp>
#include <mapnik/util/conversions.hpp> #include <mapnik/util/conversions.hpp>

View file

@ -21,7 +21,7 @@
#include <mapnik/symbolizer.hpp> #include <mapnik/symbolizer.hpp>
#include <vector> #include <vector>
#include <algorithm> #include <algorithm>
#include <mapnik/std.hpp> #include <mapnik/make_unique.hpp>
#include "utils.hpp" #include "utils.hpp"