mirror of https://github.com/CGAL/cgal
workaround static_assert for msvc <= 2019
This commit is contained in:
parent
3409d4c974
commit
0c3b8b8b11
|
|
@ -39,7 +39,8 @@ namespace CGAL {
|
||||||
template <typename T_3>
|
template <typename T_3>
|
||||||
class Conforming_Delaunay_triangulation_3 : public T_3 {
|
class Conforming_Delaunay_triangulation_3 : public T_3 {
|
||||||
public:
|
public:
|
||||||
static constexpr bool t_3_is_not_movable = CGAL::cdt_3_msvc_2017() || false == CGAL::is_nothrow_movable_v<T_3>;
|
static constexpr bool t_3_is_not_movable =
|
||||||
|
CGAL::cdt_3_msvc_2019_or_older() || false == CGAL::is_nothrow_movable_v<T_3>;
|
||||||
using Geom_traits = typename T_3::Geom_traits;
|
using Geom_traits = typename T_3::Geom_traits;
|
||||||
using Vertex_handle = typename T_3::Vertex_handle;
|
using Vertex_handle = typename T_3::Vertex_handle;
|
||||||
using Edge = typename T_3::Edge;
|
using Edge = typename T_3::Edge;
|
||||||
|
|
@ -931,7 +932,7 @@ protected:
|
||||||
|
|
||||||
Compare_vertex_handle comp = {this};
|
Compare_vertex_handle comp = {this};
|
||||||
Constraint_hierarchy constraint_hierarchy = {comp};
|
Constraint_hierarchy constraint_hierarchy = {comp};
|
||||||
static_assert(CGAL::cdt_3_msvc_2017() || CGAL::is_nothrow_movable_v<Constraint_hierarchy>);
|
static_assert(CGAL::cdt_3_msvc_2019_or_older() || CGAL::is_nothrow_movable_v<Constraint_hierarchy>);
|
||||||
Bbox_3 bbox{};
|
Bbox_3 bbox{};
|
||||||
double segment_vertex_epsilon = 1e-8;
|
double segment_vertex_epsilon = 1e-8;
|
||||||
std::optional<double> max_bbox_edge_length;
|
std::optional<double> max_bbox_edge_length;
|
||||||
|
|
|
||||||
|
|
@ -904,7 +904,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Conforming_constrained_Delaunay_triangulation_3 result{std::move(*this)};
|
Conforming_constrained_Delaunay_triangulation_3 result{std::move(*this)};
|
||||||
static_assert(CGAL::cdt_3_msvc_2017() ||
|
static_assert(CGAL::cdt_3_msvc_2019_or_older() ||
|
||||||
CGAL::is_nothrow_movable_v<Triangulation> == false ||
|
CGAL::is_nothrow_movable_v<Triangulation> == false ||
|
||||||
CGAL::is_nothrow_movable_v<Conforming_constrained_Delaunay_triangulation_3>);
|
CGAL::is_nothrow_movable_v<Conforming_constrained_Delaunay_triangulation_3>);
|
||||||
static_assert(std::is_same_v<std::remove_reference_t<decltype(*this)>, Conforming_constrained_Delaunay_triangulation_3>);
|
static_assert(std::is_same_v<std::remove_reference_t<decltype(*this)>, Conforming_constrained_Delaunay_triangulation_3>);
|
||||||
|
|
@ -1123,7 +1123,7 @@ private:
|
||||||
using CDT_2_traits = typename CDT_2_types::Projection_traits;
|
using CDT_2_traits = typename CDT_2_types::Projection_traits;
|
||||||
using CDT_2_face_handle = typename CDT_2::Face_handle;
|
using CDT_2_face_handle = typename CDT_2::Face_handle;
|
||||||
using CDT_2_edge = typename CDT_2::Edge;
|
using CDT_2_edge = typename CDT_2::Edge;
|
||||||
static_assert(CGAL::cdt_3_msvc_2017() || CGAL::is_nothrow_movable_v<CDT_2>);
|
static_assert(CGAL::cdt_3_msvc_2019_or_older() || CGAL::is_nothrow_movable_v<CDT_2>);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
struct PLC_error : Error_exception {
|
struct PLC_error : Error_exception {
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
constexpr bool cdt_3_msvc_2017() {
|
constexpr bool cdt_3_msvc_2019_or_older() {
|
||||||
#if defined(_MSC_VER) && (_MSC_VER < 1920)
|
#if defined(_MSC_VER) && (_MSC_VER < 1930)
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue