File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
include/boost/geometry/geometries Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,11 @@ class point
8282 // passed for non-Cartesian coordinate systems.
8383 enum { cs_check = sizeof (CoordinateSystem) };
8484
85+ template <typename DT, bool Condition, typename T = void >
86+ struct enable_ctor_if
87+ : std::enable_if<Condition, T>
88+ {};
89+
8590public:
8691
8792 // TODO: constexpr requires LiteralType and until C++20
@@ -124,6 +129,11 @@ class point
124129 }
125130
126131 // / @brief Constructor to set two values
132+ template
133+ <
134+ typename T = CoordinateType,
135+ typename enable_ctor_if<T, (DimensionCount >= 2 ), int >::type = 0
136+ >
127137#if ! defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING)
128138 constexpr
129139#endif
@@ -137,6 +147,11 @@ class point
137147 }
138148
139149 // / @brief Constructor to set three values
150+ template
151+ <
152+ typename T = CoordinateType,
153+ typename enable_ctor_if<T, (DimensionCount >= 3 ), int >::type = 0
154+ >
140155#if ! defined(BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING)
141156 constexpr
142157#endif
You can’t perform that action at this time.
0 commit comments