#ifndef MBGL_UTIL_STD #define MBGL_UTIL_STD #include namespace std { // C++14 backfill from http://herbsutter.com/gotw/_102/ template ::std::unique_ptr make_unique(Args&& ...args) { return ::std::unique_ptr(new T(::std::forward(args)...)); } } namespace mbgl { namespace util { template void erase_if(Container &container, ForwardIterator it, const ForwardIterator end, Predicate pred) { while (it != end) { if (pred(*it)) { container.erase(it++); } else { ++it; } } } template void erase_if(Container &container, Predicate pred) { erase_if(container, container.begin(), container.end(), pred); } } } #endif