Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SFINAE 'insert' and 'do_intersect' #8769

Closed

Conversation

ViNN280801
Copy link

Summary of Changes

I fixed an error in the code related to the incorrect use of std::is_same. In the source code, there was an attempt to use std::is_some<int, int>::type as a function parameter, which caused a compilation error. I removed this unnecessary parameter and added type checking using SFINAE (std::enable_if).
I have Ubuntu 24.04:

loveit0@loveit0-Nitro-AN515-58:~$ uname -a
Linux loveit0-Nitro-AN515-58 6.11.0-17-generic #17~24.04.2-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 20 22:48:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

I used the CGAL in my project for intersections with AABB and when I compiling my code, I faced with these kind of errors:

/usr/local/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h:145:27: error: ‘std::is_same<__remove_cv(int), int>::type’ is not a type
  145 |             const PointLocation& pl, ZoneVisitor &visitor,
      |                           ^~~
/usr/local/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h:471:27: error: ‘std::is_same<__remove_cv(int), int>::type’ is not a type
  471 |             InputIterator begin, InputIterator end,
      |                           ^~~
/usr/local/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h:1534:5: error: ‘std::is_same<__remove_cv(int), int>::type’ is not a type
 1534 |              const PointLocation& pl, std::is_same<int, int>::type)
      |     ^  

Release Management

  • Affected package(s): Arrangement_on_surface_2
  • Issue(s) solved (if any): -
  • Feature/Small Feature (if any): N/A
  • License and copyright ownership: This contribution is licensed under the terms used by CGAL, and the authorship remains with the contributors.

lrineau and others added 30 commits December 5, 2024 14:34
That feature has been dead since Sept 2021 and no longer maintained.

It is probably not needed anymore, and not working anyway.
…GAL#8651)

## Summary of Changes

Fix an action  not being in the correct menu.


![image](https://github.com/user-attachments/assets/3bf28234-3927-4def-9182-a923ce8d10a4)

Not done in CGAL#8609 because that PR
targets 5.6.

## Release Management

* Affected package(s): `Lab`
* Issue(s) solved (if any): -
* Feature/Small Feature (if any): -
* License and copyright ownership: no change
_Please use the following template to help us managing pull requests._

## Summary of Changes

There are 4 examples in Nef_2 package: three use Exact_integer, and one
uses a bounded kernel (which is undocumented).

Update one example to show how to use Exact_rational (wich requires to
change the kernel).

## Release Management

* Affected package(s): Nef_2
## Summary of Changes

Turn several copies into `const&` to avoid allocation of data members of
traits object with multiprecision coordinates. In release mode the gain
is around 10%..

To address the timeouts in the testsuite in Debug mode, I also changed
cell size and approximation error.

## Release Management

* Affected package(s): Periodic_triangulation_3_mesh_3
* License and copyright ownership: unchanged
Correction of incorrect usage of LaTeX in formulas and bibliography
altough MatHJax and bibtex.pl doesn't always signal it.
- Incorrect biblio entry (missing `,` and `}`)
  - Documentation/doc/biblio/geom.bib
- `&nbsp` is not correct LaTeX has to be `~`
-
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt
  - Documentation/doc/Documentation/Developer_manual/Chapter_intro.txt
- Incorrect formula regarding usage of `\left` and `\right` (also
signaled by MathJax
-
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt
- `DeclareMathOperator` is a command that should be in the preamble,
alternatively the command `\operatorname` can be used explicitly (as
done here as it is only used once)
-
Kinetic_surface_reconstruction/doc/Kinetic_surface_reconstruction/Kinetic_surface_reconstruction.txt
- Latex has problems with `_` in a `text...` command so it should be
escaped though this gives problems with MathJax hence the extra hook.
MathJax reference:
https://groups.google.com/g/mathjax-users/c/wSh6-hSIUpQ/m/KmzZhQQGslgJ
  - Documentation/doc/resources/1.10.0/CGAL_mathjax.js
  - Documentation/doc/resources/1.8.13/CGAL_mathjax.js
  - Documentation/doc/resources/1.9.6/CGAL_mathjax.js
  - Weights/include/CGAL/Weights/authalic_weights.h
lrineau and others added 29 commits February 10, 2025 18:07
## Release Management

* Affected package(s):
* Issue(s) solved (if any): fix CGAL#7781 CGAL#7782 
* Feature/Small Feature (if any):
* Link to compiled documentation (obligatory for small feature) [*wrong
link name to be changed*](httpssss://wrong_URL_to_be_changed/Manual/Pkg)
* License and copyright ownership:
It is not clear to me that this is the right thing to do:
- it is done for some classes
- but in some test, a comment mention that it should be uninitialized
(the test works if init to -1 but not to 0).
- Base_time_stamper is doing an init to -2
Improvement backports from CDT_3 branch (Follow-up to PR CGAL#8170)
- compare doxygen version with the available directories on disk and
(try to) use the most appropriate one
- give a warning when there are more directories than expected (already
present), though `FATAL` should probably be `FATAL_ERROR` though the
latest will give problems when adding a new version to the directory
list for testing. Changed the message to a `WARNING`
## Summary of Changes

Add new repair rules in Polygon_repair package

## Release Management

* Affected package(s): Polygon_repair
* Feature/Small Feature (if any):
[link](https://cgalwiki.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Polygon_repair_union_intersection)
-- **pre-approval 2025/01/03**
* Link to compiled documentation:
[link](https://cgal.geometryfactory.com/~afabri/Repair/Manual/packages.html#PkgPolygonRepair)
* License and copyright ownership: GF
Add an Euler operation to remove degree 2 vertices
Document `point()` in all triangulations
Add functions to compute discrete curvatures
## Summary of Changes

Solve a bug for CMap and GMap when we iterate on an empty map with an
iterator that needs to mark cells, and when using index version.

## Release Management

* Affected package(s): CMap GMap
We can consider them as done now
The formula in Documentation/doc/biblio/cgal_manual.bib
```
 @Article{cgal:cgm-fobbo-11,
   title={Fast Oriented Bounding Box Optimization on the Rotation Group $\SO(3, \mathrm{R})$},
   author={Chang, Chia-Tche and Gorissen, Bastien and Melchior, Samuel},

```
renders incorrectly (see Optimal_bounding_box/citelist.html) as there is
no command `\SO` in LaTeX

The formula in doc/Kernel_d/CGAL/Kernel_d/Aff_transformation_d.h
```
\pre \f$ sin_num^2 + cos_num^2 = den^2\f$ and \f$ 0 \leq e_1 < e_2 < d\f$.
```
renders in an unexpected way (see
Kernel_d/classCGAL_1_1Aff__transformation__d.html) as the `_` is seen as
subscript operator in LaTeX
Spelling correction
Spelling correction

As this is a spelling correction is in code (and outside my normal realm of PRs) I created a separate PR for it.
I cannot test it,  b I'm quite confident that it won't lead to problems. I think the old name contained a typo.
Spelling correction

As this is a spelling correction is in code (and outside my normal realm
of PRs) I created a separate PR for it. I cannot test it, b I'm quite
confident that it won't lead to problems. I think the old name contained
a typo.
Spelling correction
…CGAL#8742)

Added a precondition for merge_edge(e1, e2) that requires that two
halfedges have the same direction.

## Summary of Changes

The title says it all

## Release Management

* Affected package(s): Arrangement_on_surface_2
* Issue(s) solved (if any): fix CGAL#8659
* Feature/Small Feature (if any): 
* Link to compiled documentation:
* License and copyright ownership: TAU
@ViNN280801 ViNN280801 closed this Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.