Commit Graph

1562 Commits

Author SHA1 Message Date
Mael Rouxel-Labbé 2c23a6d5c5 Revert back to wrapping result_type to distinguish FT-necessary operator()s 2022-10-12 21:24:59 +02:00
Mael Rouxel-Labbé 214e072959 Switch from RT_sufficient to FT_necessary 2022-09-22 12:02:53 +02:00
Laurent Rineau 4b660d9ec9 Another proposal for Filtered_predicate_RT_FT
Instead of having the return type wrapped in a `Needs_FT` tag,
not the call operator overloads that can be called with `RT` are
"tagged" by adding a last argument of type `RT_sufficient` with a
default value.
2022-09-07 11:10:13 +02:00
Laurent Rineau b114789abf Fix spelling 2022-09-06 13:56:31 +02:00
Laurent Rineau 2923eff641 Fix a warning `-Wnull-pointer-subtraction`
https://clang.llvm.org/docs/DiagnosticsReference.html#wnull-pointer-subtraction
2022-09-02 11:33:07 +02:00
Laurent Rineau 7c92341be7 Introduce CGAL_Kernel_pred_RT_or_FT
This commit introduces a new kind of predicate in
`<CGAL/Kernel/interface_macros.h>`. In addition to
  - `CGAL_kernel_pred` for predicates,
  - `CGAL_Kernel_pred_RT` for predicates that can be implemented using a
    ring-type,

now there is also:
  - `CGAL_Kernel_pred_RT_or_FT` for predicates with multiple overloads of
    `operator()`, some needing a field type and other needing a ring type
    (without the division operator).

The C++ code can discriminate between the two cases with a special wrapper
for the return type: `CGAL::Needs_FT<result_type` instead of `result_type`
(defined in `<CGAL/tags.h>`.

In `<CGAL/Filtered_predicate.h>`, in addition to the usual class template
 `Filtered_predicate`, there is now also `Filtered_predicate_RT_FT` that
 takes three predicates as template parameters instead of two:
  - the exact predicate with an ring-type,
  - the exact predicate with a field-type,
  - the approximate predicate (with `Interval_nt` as number-type).

For the moment, only `Compare_distance_3` in
`<CGAL/Cartesian/function_objects.h>` is using the new
`Filtered_predicate_RT_FT`.

Before this commit, the file
`Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h` was testing
`Compare_distance_3` only with three points or for points. This commit adds:
  - a test with `Point_3, Point_3, Segment_3`, and
  - a test with `Line_3, Point_3, Point_3`, that actually needs a field type
    with its current implementation.

In the test `Kernel_23/test/Kernel_23/Filtered_cartesian.cpp`, the macro
`CGAL_NO_MPZF_DIVISION_OPERATOR` is defined, to remove the division operator
from `CGAL::Mpzf`. `CGAL::Mpzf` is a ring-type, even with its `operator/`
(because that `operator/` can only compute exact divisions), but with
`CGAL_NO_MPZF_DIVISION_OPERATOR` defined, that is now checked by the compiler.
2022-09-02 11:31:47 +02:00
Laurent Rineau 59566d3fd8 Merge pull request #6800 from sloriot/SMS-test_relax_order
SMS test relaxed order
2022-08-29 11:35:49 +02:00
Laurent Rineau d49ee20965
Merge pull request #6665 from sloriot/CGAL-std_type_traits 2022-08-17 13:56:54 +02:00
Sébastien Loriot 4143d143e0 fix assertion 2022-08-16 17:23:07 +02:00
Sébastien Loriot 861588abe1 Merge 'sloriot/CGAL-std_type_traits' into master 2022-08-03 20:19:51 +02:00
Sébastien Loriot b1ee7ba78e move outside experimental namespace with a better API and doc 2022-07-26 15:06:49 +02:00
Laurent Rineau 0f7749432c Merge pull request #6412 from afabri/Triangulation_2-mark_domains-GF
Triangulation_2: Add CGAL::mark_domain_in_triangulation
2022-07-24 18:08:41 +02:00
Sébastien Loriot 916e48284d add an extra overload of choose_parameter for dynamic property maps 2022-07-13 12:48:27 +02:00
Sébastien Loriot 1e857506c1 Merge remote-tracking branch 'cgal/5.5.x-branch' 2022-07-12 18:22:02 +02:00
Sébastien Loriot 12795ba29c Merge remote-tracking branch 'cgal/5.4.x-branch' into HEAD 2022-07-12 18:21:16 +02:00
Sébastien Loriot 6acb3a19fe actually the warning only shows up using clang 2022-07-12 18:18:34 +02:00
Sébastien Loriot 493795f95d also accomodate older versions of clang 2022-07-12 18:18:34 +02:00
Sébastien Loriot ad1e333538 handle older GCC versions 2022-07-12 18:18:34 +02:00
Sébastien Loriot ddd0e7dd47 the warning we are trying to work around is new and we need to ignore it on older compiler 2022-07-12 18:18:34 +02:00
Sébastien Loriot f7232499a1 use the correct warning... 2022-07-12 18:18:34 +02:00
Sébastien Loriot 3d03cbc519 workaround warning with gcc master 2022-07-12 18:18:34 +02:00
Laurent Rineau 4789fcc474
Merge branch 'master' into Triangulation_2-mark_domains-GF 2022-07-11 16:38:15 +02:00
Sébastien Loriot a821707064 link to cppreference 2022-07-11 11:04:04 +02:00
Sébastien Loriot 707b45cb5b Merge remote-tracking branch 'cgal/5.5.x-branch' 2022-06-29 10:48:00 +02:00
Laurent Rineau 70caea9548 Merge pull request #6673 from afabri/STL_Extension-Skip_list_memory_leak-GF
STL_extension: Fix memory leak in Skiplist
2022-06-29 09:50:41 +02:00
Sébastien Loriot 1a4a6816ac Merge pull request #6084 from janetournois/PMP-add_surface_mesher-jtournois
PMP - add surface remeshing from Mesh_3
2022-06-29 09:20:10 +02:00
Laurent Rineau 499b7794c9 Merge pull request #5693 from janetournois/Mesh_data_structure_3-new_package-jtournois
SMDS_3: Mesh_data_structure_3 - new package for C3T3
2022-06-29 09:14:38 +02:00
Andreas Fabri 718fdcfd44 STL_Extension: Fix comment in multiset 2022-06-27 17:47:49 +01:00
Sébastien Loriot c9c6b30cf0 Merge sloriot/CGAL-std_type_traits into master 2022-06-23 16:35:37 +02:00
Laurent Rineau 1ba31d6e3f Merge branch 'master' into Triangulation_2-mark_domains-GF
# Conflicts:
#	Installation/CHANGES.md
2022-06-17 11:00:12 +02:00
Andreas Fabri 34ad804065 Cleanup after Mael's code review 2022-06-16 14:46:36 +01:00
Andreas Fabri 393dc06bf8 STL_extension: Fix memory leak in Skiplist 2022-06-16 12:34:30 +01:00
Sébastien Loriot 5fc4b4f3c4 Merge remote-tracking branch 'cgal/master' into HEAD 2022-06-16 13:33:54 +02:00
Laurent Rineau cefa3d9d80 Merge pull request #6648 from sloriot/PMP-do_not_flip_high_triangles
Add an option to a remove_almost_degenerate_faces
2022-06-15 10:20:53 +02:00
Laurent Rineau a79363275e Merge pull request #6659 from afabri/CGAL-fix_boost_doc_URLs-GF
STL_extension: Fix URL to boost libs
2022-06-15 10:20:44 +02:00
Laurent Rineau 378685ddd2 Merge pull request #6648 from sloriot/PMP-do_not_flip_high_triangles
Add an option to a remove_almost_degenerate_faces
2022-06-15 10:19:02 +02:00
Laurent Rineau a0aec6d20a Merge pull request #6659 from afabri/CGAL-fix_boost_doc_URLs-GF
STL_extension: Fix URL to boost libs
2022-06-15 10:18:53 +02:00
Sébastien Loriot 37580e9daf missing () in macro + typo fixes 2022-06-14 11:24:21 +02:00
Laurent Rineau c132b6a11e Merge remote-tracking branch 'cgal/master' into Mesh_data_structure_3-new_package-jtournois 2022-06-13 16:26:34 +02:00
Sébastien Loriot 8ed2990381 use CGAL_static_assertion
static_assert(b) is only available in c++17
2022-06-10 10:10:12 +02:00
Sébastien Loriot b96f6d5ce9 move is_iterator to type_traits 2022-06-10 09:43:59 +02:00
Sébastien Loriot 44250cb019 is_iterator_XXX<>::value --> is_iterator_XXX_v<> 2022-06-10 09:40:29 +02:00
Sébastien Loriot 3fa436459d BOOST_MPL_ASSERT -> static_assert 2022-06-10 08:46:01 +02:00
Sébastien Loriot ac8b6d4731 boost::is_same --> std::is_same 2022-06-10 08:18:20 +02:00
Sébastien Loriot 4f5f8341cc use std::enable_if_t 2022-06-10 07:37:53 +02:00
Andreas Fabri 89c4b509e1 STL_extension: Fix URL to boost libs 2022-06-09 09:33:33 +01:00
Sébastien Loriot 5746e59b34 Merge cgal/master 2022-06-08 23:13:25 +02:00
Jane Tournois d7759abbb7 add a hidden parameter to allow non-manifold vertices or edges
this is to be used only is advanced code that deals with invalid T3
2022-06-08 23:03:50 +02:00
Jane Tournois 355b52d21f rename TMDS_3 to SMDS_3, end. 2022-06-08 22:57:25 +02:00
Jane Tournois ad13062bbf move subdomain indices to a named parameter 2022-06-08 22:53:18 +02:00