> CGAL/Voronoi_diagram_2/Connected_components.h:103:19: warning: ISO C++20 considers use of overloaded operator '!=' (with operand types 'CGAL::VoronoiDiagram_2::Internal::Connected_components<...>::HAVC') to be ambiguous despite there being a unique best viable function with non-reversed arguments [-Wambiguous-reversed-operator]
I changed `operator==` into friend functions.
Before my fix, the CMakeLists.txt could be sum-up that way:
```cmake
find_package(CGAL REQUIRED)
find_package(Boost QUIET)
if(NOT Boost_FOUND)
message(
STATUS "This project requires the Boost library, and will not be compiled.")
create_single_source_cgal_program( "Point_WKT.cpp" )
# [...]
else ()
message(STATUS "This project requires the CGAL library, and will not be compiled.")
return()
endif()
```
So, on *all platform*, as Boost is mandatory and always found, the
behavior was to display "This project requires the CGAL library, and
will not be compiled." and return, without configuring any target.
I have simplified the `CMakeLists.txt` to the simplest:
```cmake
cmake_minimum_required(VERSION 3.1...3.20)
project(Stream_support_Examples)
find_package(CGAL REQUIRED)
create_single_source_cgal_program( "Point_WKT.cpp" )
```
- `cmake_minimum_required` is mandatory and must be the first line,
- `project` is mandatory,
- `find_package(CGAL REQUIRED)`: no need to test `CGAL_FOUND`, because
CGAL is required anyway. No need to search for Boost, because that is
an implementation detail of CGAL, and the CMake file
`CGALConfig.cmake` deals with that dependency
- and then the declaration of the targets.
- Use `value_type` when the returned type is not a reference
- Enforce `reference = value_type` if the returned type is not
a reference (to avoid `typename PM::reference r = get(m, k)`,
which will take a ref to a temporary if the `reference`
typedef is an actualy reference)
- Do not use `put_get_helper` if the property map is not a `lvalue`
**mutable** property map: the `put()` is `map[k] = v`, which
is broken if `operator[]` does not return a reference
- The concept `boost::lvalue_property_map_tag` requires `operator[](key)`,
not a reference in `get(map, key)`. You can have a readable property map
returning a reference through its `get(map, key)`, but if there is
no `operator[]`, it's just a `boost::readable_property_map_tag`
- Some const correctness to avoid copying maps with state
or heavy keys in `get(map, key)` / `put(map, key, value)`
- Base the category of a wrapping pmap on what it offers instead
of just forwarding the base property map's category
- Tried to do something like mutable lvalue pmap:
* `value_type& operator[](key&)`
* `ref get(map, const key&)`
* `put(map, const key&, const value_type&)`
and non-mutable lvalue pmap:
* `const value_type& operator[](const key&)`
* `ref get(map, const key&)`
but not everything fits properly...