25#include <geos/util/GEOSException.h>
26#include <geos/util/IllegalArgumentException.h>
27#include <geos/util/TopologyException.h>
31#include <geos/util/GeometricShapeFactory.h>
44ignore_unused_variable_warning(T
const &) {}
47#if __cplusplus >= 201402L
48using std::make_unique;
54 typedef std::unique_ptr<T> _Single_object;
58struct _Unique_if<T[]> {
59 typedef std::unique_ptr<T[]> _Unknown_bound;
62template<
class T,
size_t N>
63struct _Unique_if<T[N]> {
64 typedef void _Known_bound;
67template<
class T,
class... Args>
68typename _Unique_if<T>::_Single_object
69make_unique(Args &&... args) {
70 return std::unique_ptr<T>(
new T(std::forward<Args>(args)...));
74typename _Unique_if<T>::_Unknown_bound
75make_unique(
size_t n) {
76 typedef typename std::remove_extent<T>::type U;
77 return std::unique_ptr<T>(
new U[n]());
80template<
class T,
class... Args>
81typename _Unique_if<T>::_Known_bound
82make_unique(Args &&...) =
delete;
95template<
typename To,
typename From>
inline To down_cast(From* f)
98 (std::is_base_of<From,
99 typename std::remove_pointer<To>::type>::value),
100 "target type not derived from source type");
102 assert(f ==
nullptr ||
dynamic_cast<To
>(f) !=
nullptr);
104 return static_cast<To
>(f);
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26