Merge remote-tracking branch 'upstream/master' into gsoc2022

This commit is contained in:
hoskillua 2023-08-25 14:51:46 +03:00
commit a94a7337c2
2240 changed files with 138035 additions and 64312 deletions

View File

@ -75,7 +75,7 @@ jobs:
sudo apt-get update && sudo apt-get install -y graphviz ssh bibtex2html sudo apt-get update && sudo apt-get install -y graphviz ssh bibtex2html
sudo pip install lxml sudo pip install lxml
sudo pip install pyquery sudo pip install pyquery
wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~cgaltest/doxygen_1_8_13_patched/doxygen wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~cgaltest/doxygen_1_9_6_patched/doxygen
sudo mv doxygen_exe /usr/bin/doxygen sudo mv doxygen_exe /usr/bin/doxygen
sudo chmod +x /usr/bin/doxygen sudo chmod +x /usr/bin/doxygen
git config --global user.email "cgal@geometryfactory.com" git config --global user.email "cgal@geometryfactory.com"
@ -160,7 +160,7 @@ jobs:
script: | script: |
const error = process.env.ERRORMSG const error = process.env.ERRORMSG
const job_url = `${context.serverUrl}/CGAL/cgal/actions/runs/${context.runId}` const job_url = `${context.serverUrl}/CGAL/cgal/actions/runs/${context.runId}`
const msg = "There was an error while building the doc: \n"+error + "\n" + job_url const msg = "There was an error while building the doc: \n```\n"+error + "\n```\n" + job_url
github.rest.issues.createComment({ github.rest.issues.createComment({
owner: "CGAL", owner: "CGAL",
repo: "cgal", repo: "cgal",

35
.github/workflows/reuse.yml vendored Normal file
View File

@ -0,0 +1,35 @@
# SPDX-FileCopyrightText: 2020 Free Software Foundation Europe e.V. <https://fsfe.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: REUSE Compliance Check
on: [push, pull_request]
jobs:
reuse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: REUSE version
uses: fsfe/reuse-action@v2
with:
args: --version
- name: REUSE lint
uses: fsfe/reuse-action@v2
with:
args: --include-submodules lint
- name: REUSE SPDX SBOM
uses: fsfe/reuse-action@v2
with:
args: spdx
- name: install dependencies
run: sudo apt-get install -y cmake
- name: Create CGAL internal release
run: |
mkdir -p ./release
cmake -DDESTINATION=./release -DCGAL_VERSION=9.9 -P ./Scripts/developer_scripts/cgal_create_release_with_cmake.cmake
- name: REUSE lint release tarball
uses: fsfe/reuse-action@v2
with:
args: --root ./release/CGAL-9.9 --include-submodules lint

1
.gitignore vendored
View File

@ -1212,3 +1212,4 @@ gmon.*
Polygonal_surface_reconstruction/examples/build* Polygonal_surface_reconstruction/examples/build*
Polygonal_surface_reconstruction/test/build* Polygonal_surface_reconstruction/test/build*
Solver_interface/examples/build* Solver_interface/examples/build*
/Mesh_3/examples/Mesh_3/indicator_0.inr.gz

12
.reuse/dep5 Normal file
View File

@ -0,0 +1,12 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: CGAL
Upstream-Contact: CGAL Editorial Board <info@cgal.org>
Source: https://github.com/CGAL/cgal
Files: .* *.cmake *.md .github/* Maintenance/* */TODO */doc/* */deb/* */applications/* */doc_html/* */scripts/* */developer_scripts/* */demo/* */examples/* */src/* */test/* */benchmarks/* */benchmark/* */package_info/* */data/* */cmake/*
Copyright: 1995-2023 The CGAL Project
License: CC0-1.0
Files: CMakeLists.txt GraphicsView/include/CGAL/Qt/ImageInterface.ui GraphicsView/include/CGAL/Qt/resources/qglviewer-icon.xpm Installation/AUTHORS Installation/CMakeLists.txt Installation/README Installation/auxiliary/cgal_create_cmake_script.1 Installation/auxiliary/gmp/README Installation/include/CGAL/license/gpl_package_list.txt MacOSX/auxiliary/cgal_app.icns copyright
Copyright: 1995-2023 The CGAL Project
License: CC0-1.0

View File

@ -24,7 +24,7 @@ include_directories(BEFORE ./ ./include)
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5)
# Find Qt5 itself # Find Qt5 itself
find_package(Qt5 QUIET COMPONENTS Script OpenGL Gui Svg) find_package(Qt5 QUIET COMPONENTS Widgets OpenGL)
if(CGAL_Qt5_FOUND AND Qt5_FOUND) if(CGAL_Qt5_FOUND AND Qt5_FOUND)
@ -53,7 +53,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
#${CGAL_Qt5_MOC_FILES} #${CGAL_Qt5_MOC_FILES}
) )
# Link with Qt libraries # Link with Qt libraries
target_link_libraries(AABB_demo PRIVATE Qt5::OpenGL Qt5::Gui target_link_libraries(AABB_demo PRIVATE Qt5::Widgets Qt5::OpenGL
CGAL::CGAL CGAL::CGAL_Qt5) CGAL::CGAL CGAL::CGAL_Qt5)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS AABB_demo) add_to_cached_list(CGAL_EXECUTABLE_TARGETS AABB_demo)

View File

@ -9,7 +9,7 @@ and compute intersections between query objects and the primitives stored in the
In addition, it contains predicates and constructors to compute distances between a point query In addition, it contains predicates and constructors to compute distances between a point query
and the primitives stored in the AABB tree. and the primitives stored in the AABB tree.
\cgalRefines `SearchGeomTraits_3` \cgalRefines{SearchGeomTraits_3}
\cgalHasModel All models of the concept `Kernel` \cgalHasModel All models of the concept `Kernel`
@ -47,7 +47,7 @@ Provides the operator:
`return_type operator()(const Query& q, const Primitive::Datum& d)`, `return_type operator()(const Query& q, const Primitive::Datum& d)`,
which computes the intersection between `q` and `d`. The type of the returned object which computes the intersection between `q` and `d`. The type of the returned object
must be a `boost::optional` of a `boost::variant` of the possible intersection types. must be a `std::optional` of a `std::variant` of the possible intersection types.
*/ */
typedef unspecified_type Intersect_3; typedef unspecified_type Intersect_3;
@ -76,7 +76,7 @@ A functor object to compare the distance of two points wrt a third one. Provides
`CGAL::Comparison_result operator()(const Point_3& p1, const Point_3& p2, const Point_3& p3)`, `CGAL::Comparison_result operator()(const Point_3& p1, const Point_3& p2, const Point_3& p3)`,
which compares the distance between `p1 and `p2`, and between `p2` and `p3`. which compares the distance between `p1` and `p2`, and between `p2` and `p3`.
*/ */
typedef unspecified_type Compare_distance_3; typedef unspecified_type Compare_distance_3;

View File

@ -7,7 +7,7 @@ concept `AABBGeomTraits`. In addition to the types required by
`AABBGeomTraits` it also requires types and functors necessary to `AABBGeomTraits` it also requires types and functors necessary to
define the Intersection_distance functor. define the Intersection_distance functor.
\cgalRefines `AABBGeomTraits` \cgalRefines{AABBGeomTraits}
\cgalHasModel All models of the concept `Kernel` \cgalHasModel All models of the concept `Kernel`

View File

@ -25,15 +25,15 @@ public:
/*! /*!
A functor object to compute the distance between the source of a ray and its A functor object to compute the distance between the source of a ray and its
closest intersection point between the ray and a primitive or a bounding box. closest intersection point between the ray and a primitive or a bounding box.
An empty `boost::optional` is returned, if there is no intersection. An empty `std::optional` is returned, if there is no intersection.
When there is an intersection, an object of type `FT` is returned such that When there is an intersection, an object of type `FT` is returned such that
if `i1` and `i2` are two intersection points, then `i1` is closer to the source if `i1` and `i2` are two intersection points, then `i1` is closer to the source
of the ray than `i2` iff `n1 < n2`, `n1` and `n2` being the numbers returned for `i1` and `i2` of the ray than `i2` iff `n1 < n2`, `n1` and `n2` being the numbers returned for `i1` and `i2`
respectively. respectively.
Provides the operators: Provides the operators:
`boost::optional<FT> operator()(const Ray_3& r, const Bounding_box& bbox)`. `std::optional<FT> operator()(const Ray_3& r, const Bounding_box& bbox)`.
`boost::optional<std::pair<FT, Intersection_and_primitive_id<Ray_3>::%Type > > `std::optional<std::pair<FT, Intersection_and_primitive_id<Ray_3>::%Type > >
operator()(const Ray_3& r, const Primitive& primitive)`. operator()(const Ray_3& r, const Primitive& primitive)`.
A common algorithm to compute the intersection between a bounding box and a ray is <A A common algorithm to compute the intersection between a bounding box and a ray is <A

View File

@ -7,7 +7,7 @@ The concept `AABBTraits` provides the geometric primitive types and methods for
\cgalHasModel `CGAL::AABB_traits<AABBGeomTraits,AABBPrimitive>` \cgalHasModel `CGAL::AABB_traits<AABBGeomTraits,AABBPrimitive>`
\cgalRefines `SearchGeomTraits_3` \cgalRefines{SearchGeomTraits_3}
\sa `CGAL::AABB_traits<AABBGeomTraits,AABBPrimitive>` \sa `CGAL::AABB_traits<AABBGeomTraits,AABBPrimitive>`
\sa `CGAL::AABB_tree<AABBTraits>` \sa `CGAL::AABB_tree<AABBTraits>`
@ -119,10 +119,10 @@ typedef unspecified_type Do_intersect;
/*! /*!
A functor object to compute the intersection of a query and a primitive. Provides the operator: A functor object to compute the intersection of a query and a primitive. Provides the operator:
`boost::optional<Intersection_and_primitive_id<Query>::%Type > operator()(const Query & q, const Primitive& primitive);` which returns the intersection as a pair composed of an object and a primitive id, iff the query intersects the primitive. `std::optional<Intersection_and_primitive_id<Query>::%Type > operator()(const Query & q, const Primitive& primitive);` which returns the intersection as a pair composed of an object and a primitive id, iff the query intersects the primitive.
\cgalHeading{Note on Backward Compatibility} \cgalHeading{Note on Backward Compatibility}
Before the release 4.3 of \cgal, the return type of this function used to be `boost::optional<Object_and_primitive_id>`. Before the release 4.3 of \cgal, the return type of this function used to be `std::optional<Object_and_primitive_id>`.
*/ */
typedef unspecified_type Intersection; typedef unspecified_type Intersection;

View File

@ -19,8 +19,8 @@ typedef CGAL::Polyhedron_3<K> Polyhedron;
typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive; typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
typedef CGAL::AABB_traits<K, Primitive> Traits; typedef CGAL::AABB_traits<K, Primitive> Traits;
typedef CGAL::AABB_tree<Traits> Tree; typedef CGAL::AABB_tree<Traits> Tree;
typedef boost::optional< Tree::Intersection_and_primitive_id<Segment>::Type > Segment_intersection; typedef std::optional< Tree::Intersection_and_primitive_id<Segment>::Type > Segment_intersection;
typedef boost::optional< Tree::Intersection_and_primitive_id<Plane>::Type > Plane_intersection; typedef std::optional< Tree::Intersection_and_primitive_id<Plane>::Type > Plane_intersection;
typedef Tree::Primitive_id Primitive_id; typedef Tree::Primitive_id Primitive_id;
int main() int main()
@ -57,7 +57,7 @@ int main()
if(intersection) if(intersection)
{ {
// gets intersection object // gets intersection object
const Point* p = boost::get<Point>(&(intersection->first)); const Point* p = std::get_if<Point>(&(intersection->first));
if(p) if(p)
std::cout << "intersection object is a point " << *p << std::endl; std::cout << "intersection object is a point " << *p << std::endl;
@ -81,7 +81,7 @@ int main()
if(plane_intersection) if(plane_intersection)
{ {
if(boost::get<Segment>(&(plane_intersection->first))) if(std::get_if<Segment>(&(plane_intersection->first)))
std::cout << "intersection object is a segment" << std::endl; std::cout << "intersection object is a segment" << std::endl;
} }

View File

@ -23,7 +23,7 @@ typedef boost::graph_traits<Mesh>::halfedge_descriptor halfedge_descriptor;
typedef CGAL::AABB_face_graph_triangle_primitive<Mesh> Primitive; typedef CGAL::AABB_face_graph_triangle_primitive<Mesh> Primitive;
typedef CGAL::AABB_traits<K, Primitive> Traits; typedef CGAL::AABB_traits<K, Primitive> Traits;
typedef CGAL::AABB_tree<Traits> Tree; typedef CGAL::AABB_tree<Traits> Tree;
typedef boost::optional<Tree::Intersection_and_primitive_id<Ray>::Type> Ray_intersection; typedef std::optional<Tree::Intersection_and_primitive_id<Ray>::Type> Ray_intersection;
struct Skip struct Skip
{ {
@ -70,8 +70,8 @@ int main(int argc, char* argv[])
Ray_intersection intersection = tree.first_intersection(ray, skip); Ray_intersection intersection = tree.first_intersection(ray, skip);
if(intersection) if(intersection)
{ {
if(boost::get<Point>(&(intersection->first))){ if(std::get_if<Point>(&(intersection->first))){
const Point* p = boost::get<Point>(&(intersection->first) ); const Point* p = std::get_if<Point>(&(intersection->first) );
std::cout << *p << std::endl; std::cout << *p << std::endl;
} }
} }

View File

@ -24,7 +24,6 @@
#include <iterator> #include <iterator>
#include <boost/mpl/and.hpp> #include <boost/mpl/and.hpp>
#include <CGAL/type_traits/is_iterator.h> #include <CGAL/type_traits/is_iterator.h>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/mpl/if.hpp> #include <boost/mpl/if.hpp>
#include <CGAL/Default.h> #include <CGAL/Default.h>
@ -34,7 +33,7 @@ namespace CGAL {
/*! /*!
* \ingroup PkgAABBTreeRef * \ingroup PkgAABBTreeRef
* Primitive type for a edge of a polyhedral surface. * Primitive type for an edge of a polyhedral surface.
* It wraps an `edge_descriptor` into a 3D segment. * It wraps an `edge_descriptor` into a 3D segment.
* The class model of `HalfedgeGraph` from which the primitive is built should not be deleted * The class model of `HalfedgeGraph` from which the primitive is built should not be deleted
* while the AABB tree holding the primitive is in use. * while the AABB tree holding the primitive is in use.

View File

@ -27,7 +27,7 @@
#include <CGAL/Kernel_23/internal/Has_boolean_tags.h> #include <CGAL/Kernel_23/internal/Has_boolean_tags.h>
#include <boost/optional.hpp> #include <optional>
/// \file AABB_traits.h /// \file AABB_traits.h
@ -39,7 +39,7 @@ template <class T>
struct Remove_optional { typedef T type; }; struct Remove_optional { typedef T type; };
template <class T> template <class T>
struct Remove_optional< ::boost::optional<T> > { typedef T type; }; struct Remove_optional< ::std::optional<T> > { typedef T type; };
//helper controlling whether extra data should be stored in the AABB_tree traits class //helper controlling whether extra data should be stored in the AABB_tree traits class
template <class Primitive, bool has_shared_data=Has_nested_type_Shared_data<Primitive>::value> template <class Primitive, bool has_shared_data=Has_nested_type_Shared_data<Primitive>::value>
@ -85,7 +85,7 @@ struct AABB_traits_base_2<GeomTraits,true>{
typedef typename CGAL::Bbox_3 Bounding_box; typedef typename CGAL::Bbox_3 Bounding_box;
struct Intersection_distance { struct Intersection_distance {
boost::optional<FT> operator()(const Ray_3& ray, const Bounding_box& bbox) const { std::optional<FT> operator()(const Ray_3& ray, const Bounding_box& bbox) const {
FT t_near = -DBL_MAX; // std::numeric_limits<FT>::lowest(); C++1903 FT t_near = -DBL_MAX; // std::numeric_limits<FT>::lowest(); C++1903
FT t_far = DBL_MAX; FT t_far = DBL_MAX;
@ -101,7 +101,7 @@ struct AABB_traits_base_2<GeomTraits,true>{
for(int i = 0; i < 3; ++i, ++source_iter, ++direction_iter) { for(int i = 0; i < 3; ++i, ++source_iter, ++direction_iter) {
if(*direction_iter == 0) { if(*direction_iter == 0) {
if((*source_iter < (bbox.min)(i)) || (*source_iter > (bbox.max)(i))) { if((*source_iter < (bbox.min)(i)) || (*source_iter > (bbox.max)(i))) {
return boost::none; return std::nullopt;
} }
} else { } else {
FT t1 = ((bbox.min)(i) - *source_iter) / *direction_iter; FT t1 = ((bbox.min)(i) - *source_iter) / *direction_iter;
@ -118,7 +118,7 @@ struct AABB_traits_base_2<GeomTraits,true>{
// t_far = t2; // t_far = t2;
if(t_near > t_far || t_far < FT(0.)) if(t_near > t_far || t_far < FT(0.))
return boost::none; return std::nullopt;
} }
} }
@ -193,7 +193,7 @@ public:
/// `Intersection_and_primitive_id<Query>::%Type::first_type` is found according to /// `Intersection_and_primitive_id<Query>::%Type::first_type` is found according to
/// the result type of `GeomTraits::Intersect_3::operator()`. If it is /// the result type of `GeomTraits::Intersect_3::operator()`. If it is
/// `boost::optional<T>` then it is `T`, and the result type otherwise. /// `std::optional<T>` then it is `T`, and the result type otherwise.
template<typename Query> template<typename Query>
struct Intersection_and_primitive_id { struct Intersection_and_primitive_id {
typedef decltype( typedef decltype(
@ -364,12 +364,12 @@ public:
Intersection(const AABB_traits<GeomTraits,AABBPrimitive,BboxMap>& traits) Intersection(const AABB_traits<GeomTraits,AABBPrimitive,BboxMap>& traits)
:m_traits(traits) {} :m_traits(traits) {}
template<typename Query> template<typename Query>
boost::optional< typename Intersection_and_primitive_id<Query>::Type > std::optional< typename Intersection_and_primitive_id<Query>::Type >
operator()(const Query& query, const typename AT::Primitive& primitive) const { operator()(const Query& query, const typename AT::Primitive& primitive) const {
auto inter_res = GeomTraits().intersect_3_object()(query, internal::Primitive_helper<AT>::get_datum(primitive,m_traits)); auto inter_res = GeomTraits().intersect_3_object()(query, internal::Primitive_helper<AT>::get_datum(primitive,m_traits));
if (!inter_res) if (!inter_res)
return boost::none; return std::nullopt;
return boost::make_optional( std::make_pair(*inter_res, primitive.id()) ); return std::make_optional( std::make_pair(*inter_res, primitive.id()) );
} }
}; };

View File

@ -26,8 +26,7 @@
#include <CGAL/AABB_tree/internal/AABB_search_tree.h> #include <CGAL/AABB_tree/internal/AABB_search_tree.h>
#include <CGAL/AABB_tree/internal/Has_nested_type_Shared_data.h> #include <CGAL/AABB_tree/internal/Has_nested_type_Shared_data.h>
#include <CGAL/AABB_tree/internal/Primitive_helper.h> #include <CGAL/AABB_tree/internal/Primitive_helper.h>
#include <boost/optional.hpp> #include <optional>
#include <boost/lambda/lambda.hpp>
#ifdef CGAL_HAS_THREADS #ifdef CGAL_HAS_THREADS
#include <CGAL/mutex.h> #include <CGAL/mutex.h>
@ -143,7 +142,7 @@ namespace CGAL {
/// An explicit call to `build()` must be made to ensure that the next call to /// An explicit call to `build()` must be made to ensure that the next call to
/// a query function will not trigger the construction of the data structure. /// a query function will not trigger the construction of the data structure.
/// A call to `AABBTraits::set_shared_data(t...)` is made using the internally stored traits. /// A call to `AABBTraits::set_shared_data(t...)` is made using the internally stored traits.
/// This procedure has a complexity of \f$O(n log(n))\f$, where \f$n\f$ is the number of /// This procedure has a complexity of \cgalBigO{n log(n)}, where \f$n\f$ is the number of
/// primitives of the tree. /// primitives of the tree.
template<typename ... T> template<typename ... T>
void build(T&& ...); void build(T&& ...);
@ -271,7 +270,7 @@ public:
/// \tparam Query must be a type for which `Do_intersect` operators are /// \tparam Query must be a type for which `Do_intersect` operators are
/// defined in the traits class `AABBTraits`. /// defined in the traits class `AABBTraits`.
template <typename Query> template <typename Query>
boost::optional<Primitive_id> any_intersected_primitive(const Query& query) const; std::optional<Primitive_id> any_intersected_primitive(const Query& query) const;
///@} ///@}
/// \name Intersections /// \name Intersections
@ -294,7 +293,7 @@ public:
/// \tparam Query must be a type for which `Do_intersect` and `Intersection` operators are /// \tparam Query must be a type for which `Do_intersect` and `Intersection` operators are
/// defined in the traits class `AABBTraits`. /// defined in the traits class `AABBTraits`.
template <typename Query> template <typename Query>
boost::optional< typename Intersection_and_primitive_id<Query>::Type > std::optional< typename Intersection_and_primitive_id<Query>::Type >
any_intersection(const Query& query) const; any_intersection(const Query& query) const;
@ -318,15 +317,15 @@ public:
/// `AABBTraits` must be a model of `AABBRayIntersectionTraits` to /// `AABBTraits` must be a model of `AABBRayIntersectionTraits` to
/// call this member function. /// call this member function.
template<typename Ray, typename SkipFunctor> template<typename Ray, typename SkipFunctor>
boost::optional< typename Intersection_and_primitive_id<Ray>::Type > std::optional< typename Intersection_and_primitive_id<Ray>::Type >
first_intersection(const Ray& query, const SkipFunctor& skip) const; first_intersection(const Ray& query, const SkipFunctor& skip) const;
/// \cond /// \cond
template<typename Ray> template<typename Ray>
boost::optional< typename Intersection_and_primitive_id<Ray>::Type > std::optional< typename Intersection_and_primitive_id<Ray>::Type >
first_intersection(const Ray& query) const first_intersection(const Ray& query) const
{ {
return first_intersection(query, boost::lambda::constant(false)); return first_intersection(query, [](Primitive_id){ return false; });
} }
/// \endcond /// \endcond
@ -343,15 +342,15 @@ public:
/// `AABBTraits` must be a model of `AABBRayIntersectionTraits` to /// `AABBTraits` must be a model of `AABBRayIntersectionTraits` to
/// call this member function. /// call this member function.
template<typename Ray, typename SkipFunctor> template<typename Ray, typename SkipFunctor>
boost::optional<Primitive_id> std::optional<Primitive_id>
first_intersected_primitive(const Ray& query, const SkipFunctor& skip) const; first_intersected_primitive(const Ray& query, const SkipFunctor& skip) const;
/// \cond /// \cond
template<typename Ray> template<typename Ray>
boost::optional<Primitive_id> std::optional<Primitive_id>
first_intersected_primitive(const Ray& query) const first_intersected_primitive(const Ray& query) const
{ {
return first_intersected_primitive(query, boost::lambda::constant(false)); return first_intersected_primitive(query, [](Primitive_id){ return false; });
} }
/// \endcond /// \endcond
///@} ///@}
@ -964,7 +963,7 @@ public:
template <typename Tr> template <typename Tr>
template <typename Query> template <typename Query>
boost::optional< typename AABB_tree<Tr>::template Intersection_and_primitive_id<Query>::Type > std::optional< typename AABB_tree<Tr>::template Intersection_and_primitive_id<Query>::Type >
AABB_tree<Tr>::any_intersection(const Query& query) const AABB_tree<Tr>::any_intersection(const Query& query) const
{ {
using namespace CGAL::internal::AABB_tree; using namespace CGAL::internal::AABB_tree;
@ -976,7 +975,7 @@ public:
template <typename Tr> template <typename Tr>
template <typename Query> template <typename Query>
boost::optional<typename AABB_tree<Tr>::Primitive_id> std::optional<typename AABB_tree<Tr>::Primitive_id>
AABB_tree<Tr>::any_intersected_primitive(const Query& query) const AABB_tree<Tr>::any_intersected_primitive(const Query& query) const
{ {
using namespace CGAL::internal::AABB_tree; using namespace CGAL::internal::AABB_tree;

View File

@ -19,8 +19,7 @@
#include <functional> #include <functional>
#include <type_traits> #include <type_traits>
#include <boost/optional.hpp> #include <optional>
#include <boost/variant/apply_visitor.hpp>
# if defined(BOOST_MSVC) # if defined(BOOST_MSVC)
# pragma warning(push) # pragma warning(push)
# pragma warning(disable: 4996) # pragma warning(disable: 4996)
@ -43,7 +42,7 @@ class AABB_ray_intersection {
public: public:
AABB_ray_intersection(const AABBTree& tree) : tree_(tree) {} AABB_ray_intersection(const AABBTree& tree) : tree_(tree) {}
boost::optional< Ray_intersection_and_primitive_id > std::optional< Ray_intersection_and_primitive_id >
ray_intersection(const Ray& query, SkipFunctor skip) const { ray_intersection(const Ray& query, SkipFunctor skip) const {
// We hit the root, now continue on the children. Keep track of // We hit the root, now continue on the children. Keep track of
// nb_primitives through a variable in each Node on the stack. In // nb_primitives through a variable in each Node on the stack. In
@ -63,7 +62,7 @@ public:
Heap_type pq; Heap_type pq;
// pq.reserve(tree_.size() / 2); // pq.reserve(tree_.size() / 2);
boost::optional< Ray_intersection_and_primitive_id > std::optional< Ray_intersection_and_primitive_id >
intersection, /* the temporary for calculating the result */ intersection, /* the temporary for calculating the result */
p; /* the current best intersection */ p; /* the current best intersection */
@ -84,7 +83,7 @@ public:
if(!skip(current.node->left_data().id()) /* && do_intersect_obj(query, current.node->left_data()) */) { if(!skip(current.node->left_data().id()) /* && do_intersect_obj(query, current.node->left_data()) */) {
intersection = intersection_obj(query, current.node->left_data()); intersection = intersection_obj(query, current.node->left_data());
if(intersection) { if(intersection) {
FT ray_distance = boost::apply_visitor(param_visitor, intersection->first); FT ray_distance = std::visit(param_visitor, intersection->first);
if(ray_distance < t) { if(ray_distance < t) {
t = ray_distance; t = ray_distance;
p = intersection; p = intersection;
@ -96,7 +95,7 @@ public:
if(!skip(current.node->right_data().id()) /* && do_intersect_obj(query, current.node->right_data()) */) { if(!skip(current.node->right_data().id()) /* && do_intersect_obj(query, current.node->right_data()) */) {
intersection = intersection_obj(query, current.node->right_data()); intersection = intersection_obj(query, current.node->right_data());
if(intersection) { if(intersection) {
FT ray_distance = boost::apply_visitor(param_visitor, intersection->first); FT ray_distance = std::visit(param_visitor, intersection->first);
if(ray_distance < t) { if(ray_distance < t) {
t = ray_distance; t = ray_distance;
p = intersection; p = intersection;
@ -111,7 +110,7 @@ public:
if(!skip(current.node->left_data().id()) /* && do_intersect_obj(query, current.node->left_data()) */) { if(!skip(current.node->left_data().id()) /* && do_intersect_obj(query, current.node->left_data()) */) {
intersection = intersection_obj(query, current.node->left_data()); intersection = intersection_obj(query, current.node->left_data());
if(intersection) { if(intersection) {
FT ray_distance = boost::apply_visitor(param_visitor, intersection->first); FT ray_distance = std::visit(param_visitor, intersection->first);
if(ray_distance < t) { if(ray_distance < t) {
t = ray_distance; t = ray_distance;
p = intersection; p = intersection;
@ -121,7 +120,7 @@ public:
// right child // right child
const Node* child = &(current.node->right_child()); const Node* child = &(current.node->right_child());
boost::optional< FT > dist = intersection_distance_obj(query, child->bbox()); std::optional< FT > dist = intersection_distance_obj(query, child->bbox());
if(dist) if(dist)
pq.push(Node_ptr_with_ft(child, *dist, 2)); pq.push(Node_ptr_with_ft(child, *dist, 2));
@ -130,7 +129,7 @@ public:
default: // Children both inner nodes default: // Children both inner nodes
{ {
const Node* child = &(current.node->left_child()); const Node* child = &(current.node->left_child());
boost::optional<FT> dist = intersection_distance_obj(query, child->bbox()); std::optional<FT> dist = intersection_distance_obj(query, child->bbox());
if(dist) if(dist)
pq.push(Node_ptr_with_ft(child, *dist, current.nb_primitives/2)); pq.push(Node_ptr_with_ft(child, *dist, current.nb_primitives/2));
@ -198,10 +197,10 @@ private:
template<typename AABBTraits> template<typename AABBTraits>
template<typename Ray, typename SkipFunctor> template<typename Ray, typename SkipFunctor>
boost::optional< typename AABB_tree<AABBTraits>::template Intersection_and_primitive_id<Ray>::Type > std::optional< typename AABB_tree<AABBTraits>::template Intersection_and_primitive_id<Ray>::Type >
AABB_tree<AABBTraits>::first_intersection(const Ray& query, AABB_tree<AABBTraits>::first_intersection(const Ray& query,
const SkipFunctor& skip) const { const SkipFunctor& skip) const {
CGAL_static_assertion_msg((std::is_same<Ray, typename AABBTraits::Ray_3>::value), static_assert(std::is_same<Ray, typename AABBTraits::Ray_3>::value,
"Ray and Ray_3 must be the same type"); "Ray and Ray_3 must be the same type");
switch(size()) // copy-paste from AABB_tree::traversal switch(size()) // copy-paste from AABB_tree::traversal
@ -219,22 +218,22 @@ AABB_tree<AABBTraits>::first_intersection(const Ray& query,
break; break;
} }
} }
return boost::none; return std::nullopt;
} }
template<typename AABBTraits> template<typename AABBTraits>
template<typename Ray, typename SkipFunctor> template<typename Ray, typename SkipFunctor>
boost::optional<typename AABB_tree<AABBTraits>::Primitive_id> std::optional<typename AABB_tree<AABBTraits>::Primitive_id>
AABB_tree<AABBTraits>::first_intersected_primitive(const Ray& query, AABB_tree<AABBTraits>::first_intersected_primitive(const Ray& query,
const SkipFunctor& skip) const const SkipFunctor& skip) const
{ {
boost::optional< std::optional<
typename AABB_tree<AABBTraits>:: typename AABB_tree<AABBTraits>::
template Intersection_and_primitive_id<Ray>::Type > res = template Intersection_and_primitive_id<Ray>::Type > res =
first_intersection(query, skip); first_intersection(query, skip);
if ( (bool) res ) if ( (bool) res )
return boost::make_optional( res->second ); return std::make_optional( res->second );
return boost::none; return std::nullopt;
} }
} }

View File

@ -17,7 +17,7 @@
#include <CGAL/AABB_tree/internal/AABB_node.h> #include <CGAL/AABB_tree/internal/AABB_node.h>
#include <boost/optional.hpp> #include <optional>
namespace CGAL { namespace CGAL {
@ -69,7 +69,7 @@ class First_intersection_traits
public: public:
typedef typedef
boost::optional< typename AABBTraits::template Intersection_and_primitive_id<Query>::Type > std::optional< typename AABBTraits::template Intersection_and_primitive_id<Query>::Type >
Result; Result;
public: public:
First_intersection_traits(const AABBTraits& traits) First_intersection_traits(const AABBTraits& traits)
@ -124,7 +124,7 @@ public:
void intersection(const Query& query, const Primitive& primitive) void intersection(const Query& query, const Primitive& primitive)
{ {
boost::optional< typename AABBTraits::template Intersection_and_primitive_id<Query>::Type > std::optional< typename AABBTraits::template Intersection_and_primitive_id<Query>::Type >
intersection = m_traits.intersection_object()(query, primitive); intersection = m_traits.intersection_object()(query, primitive);
if(intersection) if(intersection)
@ -211,7 +211,7 @@ public:
{ {
if( m_traits.do_intersect_object()(query, primitive) ) if( m_traits.do_intersect_object()(query, primitive) )
{ {
m_result = boost::optional<typename Primitive::Id>(primitive.id()); m_result = std::optional<typename Primitive::Id>(primitive.id());
m_is_found = true; m_is_found = true;
} }
} }
@ -221,12 +221,12 @@ public:
return m_traits.do_intersect_object()(query, node.bbox()); return m_traits.do_intersect_object()(query, node.bbox());
} }
boost::optional<typename Primitive::Id> result() const { return m_result; } std::optional<typename Primitive::Id> result() const { return m_result; }
bool is_intersection_found() const { return m_is_found; } bool is_intersection_found() const { return m_is_found; }
private: private:
bool m_is_found; bool m_is_found;
boost::optional<typename Primitive::Id> m_result; std::optional<typename Primitive::Id> m_result;
const AABBTraits& m_traits; const AABBTraits& m_traits;
}; };

View File

@ -95,20 +95,23 @@ void test_all_intersection_query_types(Tree& tree)
tree.all_intersected_primitives(segment,std::back_inserter(primitives)); tree.all_intersected_primitives(segment,std::back_inserter(primitives));
// any_intersection // any_intersection
boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Ray>::Type > r = tree.any_intersection(ray); std::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Ray>::Type > r = tree.any_intersection(ray);
boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Line>::Type > l = tree.any_intersection(line); std::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Line>::Type > l = tree.any_intersection(line);
boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Segment>::Type > s = tree.any_intersection(segment); std::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Segment>::Type > s = tree.any_intersection(segment);
CGAL_USE(r);
CGAL_USE(l);
CGAL_USE(s);
// any_intersected_primitive // any_intersected_primitive
boost::optional<typename Primitive::Id> optional_primitive; std::optional<typename Primitive::Id> optional_primitive;
optional_primitive = tree.any_intersected_primitive(ray); optional_primitive = tree.any_intersected_primitive(ray);
optional_primitive = tree.any_intersected_primitive(line); optional_primitive = tree.any_intersected_primitive(line);
optional_primitive = tree.any_intersected_primitive(segment); optional_primitive = tree.any_intersected_primitive(segment);
// all_intersections // all_intersections
std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Ray>::Type > > intersections_r; std::list< std::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Ray>::Type > > intersections_r;
std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Line>::Type > > intersections_l; std::list< std::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Line>::Type > > intersections_l;
std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Segment>::Type > > intersections_s; std::list< std::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Segment>::Type > > intersections_s;
tree.all_intersections(ray,std::back_inserter(intersections_r)); tree.all_intersections(ray,std::back_inserter(intersections_r));
tree.all_intersections(line,std::back_inserter(intersections_l)); tree.all_intersections(line,std::back_inserter(intersections_l));
tree.all_intersections(segment,std::back_inserter(intersections_s)); tree.all_intersections(segment,std::back_inserter(intersections_s));
@ -322,7 +325,7 @@ class Naive_implementations
typedef typename Traits::Point_3 Point; typedef typename Traits::Point_3 Point;
typedef typename Traits::Point_and_primitive_id Point_and_primitive_id; typedef typename Traits::Point_and_primitive_id Point_and_primitive_id;
typedef boost::optional<Object_and_primitive_id> Intersection_result; typedef std::optional<Object_and_primitive_id> Intersection_result;
const Traits& m_traits; const Traits& m_traits;
public: public:
@ -380,7 +383,7 @@ public:
Polyhedron_primitive_iterator it = Pr_generator().begin(p); Polyhedron_primitive_iterator it = Pr_generator().begin(p);
for ( ; it != Pr_generator().end(p) ; ++it ) for ( ; it != Pr_generator().end(p) ; ++it )
{ {
boost::optional< typename Traits::template Intersection_and_primitive_id<Query>::Type > std::optional< typename Traits::template Intersection_and_primitive_id<Query>::Type >
intersection = m_traits.intersection_object()(query, Pr(it,p)); intersection = m_traits.intersection_object()(query, Pr(it,p));
if ( intersection ) if ( intersection )
*out++ = *intersection; *out++ = *intersection;
@ -653,7 +656,7 @@ private:
} }
// any_intersected_primitive test (do not count time here) // any_intersected_primitive test (do not count time here)
typedef boost::optional<typename Primitive::Id> Any_primitive; typedef std::optional<typename Primitive::Id> Any_primitive;
Any_primitive primitive = tree.any_intersected_primitive(query); Any_primitive primitive = tree.any_intersected_primitive(query);
// Check: verify we do get the result by naive method // Check: verify we do get the result by naive method
@ -723,7 +726,7 @@ private:
} }
// Any intersection test (do not count time here) // Any intersection test (do not count time here)
boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Query>::Type > std::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Query>::Type >
intersection = tree.any_intersection(query); intersection = tree.any_intersection(query);
// Check: verify we do get the result by naive method // Check: verify we do get the result by naive method

View File

@ -46,7 +46,7 @@ std::size_t intersect(ForwardIterator b, ForwardIterator e, const Tree& tree, lo
v.reserve(elements); v.reserve(elements);
for(; b != e; ++b) { for(; b != e; ++b) {
tree.all_intersections(*b, std::back_inserter(v)); tree.all_intersections(*b, std::back_inserter(v));
boost::optional<Obj_type> o = tree.any_intersection(*b); std::optional<Obj_type> o = tree.any_intersection(*b);
if(o) if(o)
++counter; ++counter;
} }

View File

@ -65,7 +65,7 @@ int test()
return EXIT_FAILURE; return EXIT_FAILURE;
} }
boost::optional<Object_and_primitive_id> any; std::optional<Object_and_primitive_id> any;
any = tree.any_intersection(pq); any = tree.any_intersection(pq);
if(!any) if(!any)
{ {

View File

@ -26,16 +26,16 @@ int main()
{ {
using namespace CGAL::internal::AABB_tree; using namespace CGAL::internal::AABB_tree;
CGAL_static_assertion_msg( static_assert(
(Is_ray_intersection_geomtraits<CGAL::Epeck>::value), (Is_ray_intersection_geomtraits<CGAL::Epeck>::value),
"CGAL::Epeck should be a RayIntersectionGeomTraits"); "CGAL::Epeck should be a RayIntersectionGeomTraits");
CGAL_static_assertion_msg( static_assert(
(Is_ray_intersection_geomtraits< CGAL::Simple_cartesian<double> >::value), (Is_ray_intersection_geomtraits< CGAL::Simple_cartesian<double> >::value),
"CGAL::Epeck should be a RayIntersectionGeomTraits"); "CGAL::Epeck should be a RayIntersectionGeomTraits");
CGAL_static_assertion_msg( static_assert(
(!Is_ray_intersection_geomtraits<AABBGeomTraits>::value), (!Is_ray_intersection_geomtraits<AABBGeomTraits>::value),
"Pure AABBGeomTraits shouldn't be a RayIntersectionGeomTraits"); "Pure AABBGeomTraits shouldn't be a RayIntersectionGeomTraits");
CGAL_static_assertion_msg( static_assert(
(!Is_ray_intersection_geomtraits<nope>::value), (!Is_ray_intersection_geomtraits<nope>::value),
"The empty struct shouldn't be a RayIntersectionGeomTraits"); "The empty struct shouldn't be a RayIntersectionGeomTraits");

View File

@ -3,7 +3,6 @@
#include <iterator> #include <iterator>
#include <boost/functional/value_factory.hpp> #include <boost/functional/value_factory.hpp>
#include <boost/array.hpp>
#include <CGAL/algorithm.h> #include <CGAL/algorithm.h>
#include <CGAL/point_generators_3.h> #include <CGAL/point_generators_3.h>

View File

@ -3,7 +3,6 @@
#include <iterator> #include <iterator>
#include <boost/functional/value_factory.hpp> #include <boost/functional/value_factory.hpp>
#include <boost/array.hpp>
#include <CGAL/assertions.h> #include <CGAL/assertions.h>
#include <CGAL/algorithm.h> #include <CGAL/algorithm.h>
@ -36,7 +35,7 @@ FT point_on_ray_dist(const Ray& ray, const Point& point) {
std::size_t accum = 0; std::size_t accum = 0;
boost::optional< std::optional<
Tree::Intersection_and_primitive_id<Ray>::Type Tree::Intersection_and_primitive_id<Ray>::Type
> >
min_intersection(const Tree& tree, const Ray& ray) { min_intersection(const Tree& tree, const Ray& ray) {
@ -46,12 +45,12 @@ min_intersection(const Tree& tree, const Ray& ray) {
tree.all_intersections(ray, std::back_inserter(all_intersections)); tree.all_intersections(ray, std::back_inserter(all_intersections));
accum += all_intersections.size(); accum += all_intersections.size();
Tree::FT min_distance = DBL_MAX; Tree::FT min_distance = DBL_MAX;
boost::optional< std::optional<
Tree::Intersection_and_primitive_id<Ray>::Type Tree::Intersection_and_primitive_id<Ray>::Type
> mini = boost::none; > mini = std::nullopt;
for(IntersectionVector::iterator it2 = all_intersections.begin(); it2 != all_intersections.end(); ++it2) { for(IntersectionVector::iterator it2 = all_intersections.begin(); it2 != all_intersections.end(); ++it2) {
if(Point* point = boost::get<Point>(&(it2->first))) { if(Point* point = std::get_if<Point>(&(it2->first))) {
Vector i_ray(*point, ray.source()); Vector i_ray(*point, ray.source());
Tree::FT new_distance = i_ray.squared_length(); Tree::FT new_distance = i_ray.squared_length();
if(new_distance < min_distance) { if(new_distance < min_distance) {
@ -92,7 +91,7 @@ int main()
Vector bbox_center((bbox.xmin() + bbox.xmax()) / 2, Vector bbox_center((bbox.xmin() + bbox.xmax()) / 2,
(bbox.ymin() + bbox.ymax()) / 2, (bbox.ymin() + bbox.ymax()) / 2,
(bbox.zmin() + bbox.zmax()) / 2); (bbox.zmin() + bbox.zmax()) / 2);
boost::array<double, 3> extents; std::array<double, 3> extents;
extents[0] = bbox.xmax() - bbox.xmin(); extents[0] = bbox.xmax() - bbox.xmin();
extents[1] = bbox.ymax() - bbox.ymin(); extents[1] = bbox.ymax() - bbox.ymin();
extents[2] = bbox.zmax() - bbox.zmin(); extents[2] = bbox.zmax() - bbox.zmin();
@ -125,7 +124,7 @@ int main()
rays.reserve(NB_RAYS); rays.reserve(NB_RAYS);
std::transform(v1.begin(), v1.end(), v2.begin(), std::transform(v1.begin(), v1.end(), v2.begin(),
std::back_inserter(rays), boost::value_factory<Ray>()); std::back_inserter(rays), boost::value_factory<Ray>());
std::vector< boost::optional<Tree::Intersection_and_primitive_id<Ray>::Type > > primitives1, primitives2; std::vector< std::optional<Tree::Intersection_and_primitive_id<Ray>::Type > > primitives1, primitives2;
primitives1.reserve(NB_RAYS); primitives2.reserve(NB_RAYS); primitives1.reserve(NB_RAYS); primitives2.reserve(NB_RAYS);
@ -140,7 +139,7 @@ int main()
} }
assert(primitives1.size() == primitives2.size()); // Different amount of primitives intersected assert(primitives1.size() == primitives2.size()); // Different amount of primitives intersected
assert(std::equal(primitives1.begin(), primitives1.end(), primitives2.begin())); // Primitives mismatch assert(std::equal(primitives1.begin(), primitives1.end(), primitives2.begin())); // Primitives mismatch
std::size_t c = primitives1.size() - std::count(primitives1.begin(), primitives1.end(), boost::none); std::size_t c = primitives1.size() - std::count(primitives1.begin(), primitives1.end(), std::nullopt);
std::cout << "Intersected " << c << " primitives with " << NB_RAYS << " rays" << std::endl; std::cout << "Intersected " << c << " primitives with " << NB_RAYS << " rays" << std::endl;
std::cout << "Primitive method had to sort " << accum/NB_RAYS std::cout << "Primitive method had to sort " << accum/NB_RAYS
<< " intersections on average." << std::endl; << " intersections on average." << std::endl;

View File

@ -9,7 +9,7 @@ used in the class `CGAL::Advancing_front_surface_reconstruction`.
It defines the geometric objects (points, segments...) forming the triangulation It defines the geometric objects (points, segments...) forming the triangulation
together with a few geometric predicates and constructions on these objects. together with a few geometric predicates and constructions on these objects.
\cgalRefines `DelaunayTriangulationTraits_3` \cgalRefines{DelaunayTriangulationTraits_3}
\cgalHasModel All models of `Kernel`. \cgalHasModel All models of `Kernel`.
*/ */

View File

@ -186,7 +186,7 @@ namespace CGAL {
CGAL::Advancing_front_surface_reconstruction_vertex_base_3< CGAL::Advancing_front_surface_reconstruction_vertex_base_3<
CGAL::Exact_predicates_inexact_constructions_kernel>, CGAL::Exact_predicates_inexact_constructions_kernel>,
CGAL::Advancing_front_surface_reconstruction_cell_base_3< CGAL::Advancing_front_surface_reconstruction_cell_base_3<
CGAL::Exact_predicates_inexact_constructions_kernel> > >` CGAL::Exact_predicates_inexact_constructions_kernel> > >
\endcode \endcode
\tparam P must be a functor offering \tparam P must be a functor offering

View File

@ -8,7 +8,7 @@ namespace AlgebraicStructureTraits_{
`AdaptableBinaryFunction` computes the integral quotient of division `AdaptableBinaryFunction` computes the integral quotient of division
with remainder. with remainder.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicStructureTraits` \sa `AlgebraicStructureTraits`
\sa `AlgebraicStructureTraits_::Mod` \sa `AlgebraicStructureTraits_::Mod`
@ -58,4 +58,4 @@ template <class NT1, class NT2> result_type operator()(NT1 x, NT2 y);
}; /* end Div */ }; /* end Div */
} }

View File

@ -189,7 +189,7 @@ r
</TABLE> </TABLE>
\cgalRefines `AdaptableFunctor` \cgalRefines{AdaptableFunctor}
\sa `AlgebraicStructureTraits` \sa `AlgebraicStructureTraits`
\sa `AlgebraicStructureTraits_::Mod` \sa `AlgebraicStructureTraits_::Mod`

View File

@ -16,7 +16,7 @@ This functor is required to provide two operators. The first operator takes two
arguments and returns true if the first argument divides the second argument. arguments and returns true if the first argument divides the second argument.
The second operator returns \f$ c\f$ via the additional third argument. The second operator returns \f$ c\f$ via the additional third argument.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicStructureTraits` \sa `AlgebraicStructureTraits`
\sa `AlgebraicStructureTraits_::IntegralDivision` \sa `AlgebraicStructureTraits_::IntegralDivision`

View File

@ -17,7 +17,7 @@ unit-normal (i.e.\ have unit part 1).
to the partial order of divisibility. This is because an element \f$ a \in R\f$ is said to divide \f$ b \in R\f$, iff \f$ \exists r \in R\f$ such that \f$ a \cdot r = b\f$. to the partial order of divisibility. This is because an element \f$ a \in R\f$ is said to divide \f$ b \in R\f$, iff \f$ \exists r \in R\f$ such that \f$ a \cdot r = b\f$.
Thus, \f$ 0\f$ is divided by every element of the Ring, in particular by itself. Thus, \f$ 0\f$ is divided by every element of the Ring, in particular by itself.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicStructureTraits` \sa `AlgebraicStructureTraits`

View File

@ -13,7 +13,7 @@ exists (i.e.\ if \f$ x\f$ is divisible by \f$ y\f$). Otherwise the effect of inv
this operation is undefined. Since the ring represented is an integral domain, this operation is undefined. Since the ring represented is an integral domain,
\f$ z\f$ is uniquely defined if it exists. \f$ z\f$ is uniquely defined if it exists.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicStructureTraits` \sa `AlgebraicStructureTraits`
\sa `AlgebraicStructureTraits_::Divides` \sa `AlgebraicStructureTraits_::Divides`

View File

@ -8,7 +8,7 @@ namespace AlgebraicStructureTraits_{
`AdaptableUnaryFunction` providing the inverse element with `AdaptableUnaryFunction` providing the inverse element with
respect to multiplication of a `Field`. respect to multiplication of a `Field`.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `AlgebraicStructureTraits` \sa `AlgebraicStructureTraits`

View File

@ -8,7 +8,7 @@ namespace AlgebraicStructureTraits_{
`AdaptableUnaryFunction`, `AdaptableUnaryFunction`,
returns true in case the argument is the one of the ring. returns true in case the argument is the one of the ring.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `AlgebraicStructureTraits` \sa `AlgebraicStructureTraits`

View File

@ -13,7 +13,7 @@ A ring element \f$ x\f$ is said to be a square iff there exists a ring element \
that \f$ x= y*y\f$. In case the ring is a `UniqueFactorizationDomain`, that \f$ x= y*y\f$. In case the ring is a `UniqueFactorizationDomain`,
\f$ y\f$ is uniquely defined up to multiplication by units. \f$ y\f$ is uniquely defined up to multiplication by units.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicStructureTraits` \sa `AlgebraicStructureTraits`

View File

@ -7,7 +7,7 @@ namespace AlgebraicStructureTraits_{
`AdaptableUnaryFunction`, returns true in case the argument is the zero element of the ring. `AdaptableUnaryFunction`, returns true in case the argument is the zero element of the ring.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `AlgebraicStructureTraits` \sa `AlgebraicStructureTraits`
\sa `RealEmbeddableTraits_::IsZero` \sa `RealEmbeddableTraits_::IsZero`

View File

@ -7,7 +7,7 @@ namespace AlgebraicStructureTraits_{
`AdaptableBinaryFunction` providing the k-th root. `AdaptableBinaryFunction` providing the k-th root.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `FieldWithRootOf` \sa `FieldWithRootOf`
\sa `AlgebraicStructureTraits` \sa `AlgebraicStructureTraits`

View File

@ -7,7 +7,7 @@ namespace AlgebraicStructureTraits_ {
`AdaptableBinaryFunction` computes the remainder of division with remainder. `AdaptableBinaryFunction` computes the remainder of division with remainder.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicStructureTraits` \sa `AlgebraicStructureTraits`
\sa `AlgebraicStructureTraits_::Div` \sa `AlgebraicStructureTraits_::Div`

View File

@ -8,7 +8,7 @@ namespace AlgebraicStructureTraits_{
`AdaptableFunctor` computes a real root of a square-free univariate `AdaptableFunctor` computes a real root of a square-free univariate
polynomial. polynomial.
\cgalRefines `AdaptableFunctor` \cgalRefines{AdaptableFunctor}
\sa `FieldWithRootOf` \sa `FieldWithRootOf`
\sa `AlgebraicStructureTraits` \sa `AlgebraicStructureTraits`

View File

@ -7,7 +7,7 @@ namespace AlgebraicStructureTraits_{
This `AdaptableUnaryFunction` may simplify a given object. This `AdaptableUnaryFunction` may simplify a given object.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `AlgebraicStructureTraits` \sa `AlgebraicStructureTraits`

View File

@ -7,7 +7,7 @@ namespace AlgebraicStructureTraits_{
`AdaptableUnaryFunction` providing the square root. `AdaptableUnaryFunction` providing the square root.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `AlgebraicStructureTraits` \sa `AlgebraicStructureTraits`

View File

@ -7,7 +7,7 @@ namespace AlgebraicStructureTraits_{
`AdaptableUnaryFunction`, computing the square of the argument. `AdaptableUnaryFunction`, computing the square of the argument.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `AlgebraicStructureTraits` \sa `AlgebraicStructureTraits`

View File

@ -21,7 +21,7 @@ hence the unit-part of a non-zero integer is its sign. For a `Field`, every
non-zero element is a unit and is its own unit part, its unit normal non-zero element is a unit and is its own unit part, its unit normal
associate being one. The unit part of zero is, by convention, one. associate being one. The unit part of zero is, by convention, one.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `AlgebraicStructureTraits` \sa `AlgebraicStructureTraits`

View File

@ -139,7 +139,7 @@ typedef unspecified_type Is_numerical_sensitive;
This type specifies the return type of the predicates provided This type specifies the return type of the predicates provided
by this traits. The type must be convertible to `bool` and by this traits. The type must be convertible to `bool` and
typically the type indeed maps to `bool`. However, there are also typically the type indeed maps to `bool`. However, there are also
cases such as interval arithmetic, in which it is `Uncertain<bool>` cases such as interval arithmetic, in which it is `CGAL::Uncertain<bool>`
or some similar type. or some similar type.
*/ */
@ -300,4 +300,3 @@ typedef unspecified_type Root_of;
/// @} /// @}
}; /* end AlgebraicStructureTraits */ }; /* end AlgebraicStructureTraits */

View File

@ -3,7 +3,7 @@
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts \ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
\cgalConcept \cgalConcept
A model of `EuclideanRing` represents an euclidean ring (or Euclidean domain). A model of `EuclideanRing` represents a Euclidean ring (or Euclidean domain).
It is an `UniqueFactorizationDomain` that affords a suitable notion of minimality of remainders It is an `UniqueFactorizationDomain` that affords a suitable notion of minimality of remainders
such that given \f$ x\f$ and \f$ y \neq 0\f$ we obtain an (almost) unique solution to such that given \f$ x\f$ and \f$ y \neq 0\f$ we obtain an (almost) unique solution to
\f$ x = qy + r \f$ by demanding that a solution \f$ (q,r)\f$ is chosen to minimize \f$ r\f$. \f$ x = qy + r \f$ by demanding that a solution \f$ (q,r)\f$ is chosen to minimize \f$ r\f$.
@ -25,7 +25,7 @@ The most prominent example of a Euclidean ring are the integers.
Whenever both \f$ x\f$ and \f$ y\f$ are positive, then it is conventional to choose Whenever both \f$ x\f$ and \f$ y\f$ are positive, then it is conventional to choose
the smallest positive remainder \f$ r\f$. the smallest positive remainder \f$ r\f$.
\cgalRefines `UniqueFactorizationDomain` \cgalRefines{UniqueFactorizationDomain}
\sa `IntegralDomainWithoutDivision` \sa `IntegralDomainWithoutDivision`
\sa `IntegralDomain` \sa `IntegralDomain`

View File

@ -16,7 +16,7 @@ Moreover, `CGAL::Algebraic_structure_traits< Field >` is a model of
- \link AlgebraicStructureTraits::Algebraic_category `CGAL::Algebraic_structure_traits< Field >::Algebraic_category` \endlink derived from `CGAL::Field_tag` - \link AlgebraicStructureTraits::Algebraic_category `CGAL::Algebraic_structure_traits< Field >::Algebraic_category` \endlink derived from `CGAL::Field_tag`
- \link AlgebraicStructureTraits::Inverse `CGAL::Algebraic_structure_traits< FieldWithSqrt >::Inverse` \endlink which is a model of `AlgebraicStructureTraits_::Inverse` - \link AlgebraicStructureTraits::Inverse `CGAL::Algebraic_structure_traits< FieldWithSqrt >::Inverse` \endlink which is a model of `AlgebraicStructureTraits_::Inverse`
\cgalRefines `IntegralDomain` \cgalRefines{IntegralDomain}
\sa `IntegralDomainWithoutDivision` \sa `IntegralDomainWithoutDivision`
\sa `IntegralDomain` \sa `IntegralDomain`

View File

@ -7,8 +7,7 @@ The concept `FieldNumberType` combines the requirements of the concepts
A model of `FieldNumberType` can be used as a template parameter A model of `FieldNumberType` can be used as a template parameter
for Cartesian kernels. for Cartesian kernels.
\cgalRefines `Field` \cgalRefines{Field,RealEmbeddable}
\cgalRefines `RealEmbeddable`
\cgalHasModel float \cgalHasModel float
\cgalHasModel double \cgalHasModel double

View File

@ -10,7 +10,7 @@ Moreover, `CGAL::Algebraic_structure_traits< FieldWithKthRoot >` is a model of `
- \link AlgebraicStructureTraits::Algebraic_category `CGAL::Algebraic_structure_traits< FieldWithKthRoot >::Algebraic_category` \endlink derived from `CGAL::Field_with_kth_root_tag` - \link AlgebraicStructureTraits::Algebraic_category `CGAL::Algebraic_structure_traits< FieldWithKthRoot >::Algebraic_category` \endlink derived from `CGAL::Field_with_kth_root_tag`
- \link AlgebraicStructureTraits::Kth_root `CGAL::Algebraic_structure_traits< FieldWithKthRoot >::Kth_root` \endlink which is a model of `AlgebraicStructureTraits_::KthRoot` - \link AlgebraicStructureTraits::Kth_root `CGAL::Algebraic_structure_traits< FieldWithKthRoot >::Kth_root` \endlink which is a model of `AlgebraicStructureTraits_::KthRoot`
\cgalRefines `FieldWithSqrt` \cgalRefines{FieldWithSqrt}
\sa `IntegralDomainWithoutDivision` \sa `IntegralDomainWithoutDivision`
\sa `IntegralDomain` \sa `IntegralDomain`

View File

@ -11,7 +11,7 @@ Moreover, `CGAL::Algebraic_structure_traits< FieldWithRootOf >` is a model of `A
- \link AlgebraicStructureTraits::Algebraic_category `CGAL::Algebraic_structure_traits< FieldWithRootOf >::Algebraic_category` \endlink derived from `CGAL::Field_with_kth_root_tag` - \link AlgebraicStructureTraits::Algebraic_category `CGAL::Algebraic_structure_traits< FieldWithRootOf >::Algebraic_category` \endlink derived from `CGAL::Field_with_kth_root_tag`
- \link AlgebraicStructureTraits::Root_of `CGAL::Algebraic_structure_traits< FieldWithRootOf >::Root_of` \endlink which is a model of `AlgebraicStructureTraits_::RootOf` - \link AlgebraicStructureTraits::Root_of `CGAL::Algebraic_structure_traits< FieldWithRootOf >::Root_of` \endlink which is a model of `AlgebraicStructureTraits_::RootOf`
\cgalRefines `FieldWithKthRoot` \cgalRefines{FieldWithKthRoot}
\sa `IntegralDomainWithoutDivision` \sa `IntegralDomainWithoutDivision`
\sa `IntegralDomain` \sa `IntegralDomain`

View File

@ -10,7 +10,7 @@ Moreover, `CGAL::Algebraic_structure_traits< FieldWithSqrt >` is a model of `Alg
- \link AlgebraicStructureTraits::Algebraic_category `CGAL::Algebraic_structure_traits< FieldWithSqrt >::Algebraic_category` \endlink derived from `CGAL::Field_with_sqrt_tag` - \link AlgebraicStructureTraits::Algebraic_category `CGAL::Algebraic_structure_traits< FieldWithSqrt >::Algebraic_category` \endlink derived from `CGAL::Field_with_sqrt_tag`
- \link AlgebraicStructureTraits::Sqrt `CGAL::Algebraic_structure_traits< FieldWithSqrt >::Sqrt` \endlink which is a model of `AlgebraicStructureTraits_::Sqrt` - \link AlgebraicStructureTraits::Sqrt `CGAL::Algebraic_structure_traits< FieldWithSqrt >::Sqrt` \endlink which is a model of `AlgebraicStructureTraits_::Sqrt`
\cgalRefines `Field` \cgalRefines{Field}
\sa `IntegralDomainWithoutDivision` \sa `IntegralDomainWithoutDivision`
\sa `IntegralDomain` \sa `IntegralDomain`

View File

@ -113,7 +113,7 @@ FractionTraits::Denominator_type & d);
`AdaptableBinaryFunction`, returns the fraction of its arguments. `AdaptableBinaryFunction`, returns the fraction of its arguments.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `Fraction` \sa `Fraction`
\sa `FractionTraits` \sa `FractionTraits`
@ -168,7 +168,7 @@ This can be considered as a relaxed version of `AlgebraicStructureTraits_::Gcd`,
this is needed because it is not guaranteed that `FractionTraits::Denominator_type` is a model of this is needed because it is not guaranteed that `FractionTraits::Denominator_type` is a model of
`UniqueFactorizationDomain`. `UniqueFactorizationDomain`.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `Fraction` \sa `Fraction`
\sa `FractionTraits` \sa `FractionTraits`

View File

@ -16,7 +16,7 @@ In this case
\link CGAL::Coercion_traits::Are_implicit_interoperable `CGAL::Coercion_traits<A,B>::Are_implicit_interoperable`\endlink \link CGAL::Coercion_traits::Are_implicit_interoperable `CGAL::Coercion_traits<A,B>::Are_implicit_interoperable`\endlink
is `CGAL::Tag_true`. is `CGAL::Tag_true`.
\cgalRefines `ExplicitInteroperable` \cgalRefines{ExplicitInteroperable}
\sa `CGAL::Coercion_traits<A,B>` \sa `CGAL::Coercion_traits<A,B>`
\sa `ExplicitInteroperable` \sa `ExplicitInteroperable`

View File

@ -16,7 +16,7 @@ Moreover, `CGAL::Algebraic_structure_traits< IntegralDomain >` is a model of
- \link AlgebraicStructureTraits::Integral_division `CGAL::Algebraic_structure_traits< IntegralDomain >::Integral_division` \endlink which is a model of `AlgebraicStructureTraits_::IntegralDivision` - \link AlgebraicStructureTraits::Integral_division `CGAL::Algebraic_structure_traits< IntegralDomain >::Integral_division` \endlink which is a model of `AlgebraicStructureTraits_::IntegralDivision`
- \link AlgebraicStructureTraits::Divides `CGAL::Algebraic_structure_traits< IntegralDomain >::Divides` \endlink which is a model of `AlgebraicStructureTraits_::Divides` - \link AlgebraicStructureTraits::Divides `CGAL::Algebraic_structure_traits< IntegralDomain >::Divides` \endlink which is a model of `AlgebraicStructureTraits_::Divides`
\cgalRefines `IntegralDomainWithoutDivision` \cgalRefines{IntegralDomainWithoutDivision}
\sa `IntegralDomainWithoutDivision` \sa `IntegralDomainWithoutDivision`
\sa `IntegralDomain` \sa `IntegralDomain`

View File

@ -29,11 +29,7 @@ Moreover, `CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >` is
- \link AlgebraicStructureTraits::Simplify `CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Simplify` \endlink which is a model of `AlgebraicStructureTraits_::Simplify` - \link AlgebraicStructureTraits::Simplify `CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Simplify` \endlink which is a model of `AlgebraicStructureTraits_::Simplify`
- \link AlgebraicStructureTraits::Unit_part `CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Unit_part` \endlink which is a model of `AlgebraicStructureTraits_::UnitPart` - \link AlgebraicStructureTraits::Unit_part `CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Unit_part` \endlink which is a model of `AlgebraicStructureTraits_::UnitPart`
\cgalRefines `Assignable` \cgalRefines{Assignable,CopyConstructible,DefaultConstructible,EqualityComparable,FromIntConstructible}
\cgalRefines `CopyConstructible`
\cgalRefines `DefaultConstructible`
\cgalRefines `EqualityComparable`
\cgalRefines `FromIntConstructible`
\sa `IntegralDomainWithoutDivision` \sa `IntegralDomainWithoutDivision`
\sa `IntegralDomain` \sa `IntegralDomain`

View File

@ -38,8 +38,7 @@ If a number type is a model of both `IntegralDomainWithoutDivision` and
`RealEmbeddable`, it follows that the ring represented by such a number type `RealEmbeddable`, it follows that the ring represented by such a number type
is a sub-ring of the real numbers and hence has characteristic zero. is a sub-ring of the real numbers and hence has characteristic zero.
\cgalRefines `EqualityComparable` \cgalRefines{EqualityComparable,LessThanComparable}
\cgalRefines `LessThanComparable`
\sa `RealEmbeddableTraits` \sa `RealEmbeddableTraits`

View File

@ -7,7 +7,7 @@ namespace RealEmbeddableTraits_ {
`AdaptableUnaryFunction` computes the absolute value of a number. `AdaptableUnaryFunction` computes the absolute value of a number.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `RealEmbeddableTraits` \sa `RealEmbeddableTraits`

View File

@ -7,7 +7,7 @@ namespace RealEmbeddableTraits_ {
`AdaptableBinaryFunction` compares two real embeddable numbers. `AdaptableBinaryFunction` compares two real embeddable numbers.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `RealEmbeddableTraits` \sa `RealEmbeddableTraits`

View File

@ -7,7 +7,7 @@ namespace RealEmbeddableTraits_ {
`AdaptableUnaryFunction`, returns true in case the argument is negative. `AdaptableUnaryFunction`, returns true in case the argument is negative.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `RealEmbeddableTraits` \sa `RealEmbeddableTraits`

View File

@ -7,7 +7,7 @@ namespace RealEmbeddableTraits_ {
`AdaptableUnaryFunction`, returns true in case the argument is positive. `AdaptableUnaryFunction`, returns true in case the argument is positive.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `RealEmbeddableTraits` \sa `RealEmbeddableTraits`

View File

@ -7,7 +7,7 @@ namespace RealEmbeddableTraits_ {
`AdaptableUnaryFunction`, returns true in case the argument is 0. `AdaptableUnaryFunction`, returns true in case the argument is 0.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `RealEmbeddableTraits` \sa `RealEmbeddableTraits`
\sa `AlgebraicStructureTraits_::IsZero` \sa `AlgebraicStructureTraits_::IsZero`

View File

@ -7,7 +7,7 @@ namespace RealEmbeddableTraits_ {
This `AdaptableUnaryFunction` computes the sign of a real embeddable number. This `AdaptableUnaryFunction` computes the sign of a real embeddable number.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `RealEmbeddableTraits` \sa `RealEmbeddableTraits`

View File

@ -11,7 +11,7 @@ embeddable number.
Remark: In order to control the quality of approximation one has to resort Remark: In order to control the quality of approximation one has to resort
to methods that are specific to NT. There are no general guarantees whatsoever. to methods that are specific to NT. There are no general guarantees whatsoever.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `RealEmbeddableTraits` \sa `RealEmbeddableTraits`

View File

@ -9,7 +9,7 @@ namespace RealEmbeddableTraits_ {
number \f$ x\f$ a double interval containing \f$ x\f$. number \f$ x\f$ a double interval containing \f$ x\f$.
This interval is represented by `std::pair<double,double>`. This interval is represented by `std::pair<double,double>`.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `RealEmbeddableTraits` \sa `RealEmbeddableTraits`

View File

@ -8,8 +8,7 @@ The concept `RingNumberType` combines the requirements of the concepts
A model of `RingNumberType` can be used as a template parameter A model of `RingNumberType` can be used as a template parameter
for Homogeneous kernels. for Homogeneous kernels.
\cgalRefines `IntegralDomainWithoutDivision` \cgalRefines{IntegralDomainWithoutDivision,RealEmbeddable}
\cgalRefines `RealEmbeddable`
\cgalHasModel \cpp built-in number types \cgalHasModel \cpp built-in number types
\cgalHasModel `CGAL::Gmpq` \cgalHasModel `CGAL::Gmpq`

View File

@ -23,7 +23,7 @@ is a model of `AlgebraicStructureTraits` providing:
derived from `CGAL::Unique_factorization_domain_tag` derived from `CGAL::Unique_factorization_domain_tag`
- \link AlgebraicStructureTraits::Gcd `CGAL::Algebraic_structure_traits< UniqueFactorizationDomain >::Gcd` \endlink which is a model of `AlgebraicStructureTraits_::Gcd` - \link AlgebraicStructureTraits::Gcd `CGAL::Algebraic_structure_traits< UniqueFactorizationDomain >::Gcd` \endlink which is a model of `AlgebraicStructureTraits_::Gcd`
\cgalRefines `IntegralDomain` \cgalRefines{IntegralDomain}
\sa `IntegralDomainWithoutDivision` \sa `IntegralDomainWithoutDivision`
\sa `IntegralDomain` \sa `IntegralDomain`

View File

@ -9,8 +9,8 @@ int main(){
typedef FT::Numerator_type Numerator_type; typedef FT::Numerator_type Numerator_type;
typedef FT::Denominator_type Denominator_type; typedef FT::Denominator_type Denominator_type;
CGAL_static_assertion((std::is_same<Numerator_type,CGAL::Gmpz>::value)); static_assert(std::is_same<Numerator_type,CGAL::Gmpz>::value);
CGAL_static_assertion((std::is_same<Denominator_type,CGAL::Gmpz>::value)); static_assert(std::is_same<Denominator_type,CGAL::Gmpz>::value);
Numerator_type numerator; Numerator_type numerator;
Denominator_type denominator; Denominator_type denominator;

View File

@ -9,7 +9,7 @@ binary_func(const A& a , const B& b){
typedef CGAL::Coercion_traits<A,B> CT; typedef CGAL::Coercion_traits<A,B> CT;
// check for explicit interoperability // check for explicit interoperability
CGAL_static_assertion((CT::Are_explicit_interoperable::value)); static_assert(CT::Are_explicit_interoperable::value);
// CT::Cast is used to to convert both types into the coercion type // CT::Cast is used to to convert both types into the coercion type
typename CT::Cast cast; typename CT::Cast cast;

View File

@ -353,8 +353,7 @@ class Algebraic_structure_traits_base< Type_,
typedef Coercion_traits< NT1, NT2 > CT; typedef Coercion_traits< NT1, NT2 > CT;
typedef typename CT::Type Coercion_type_NT1_NT2; typedef typename CT::Type Coercion_type_NT1_NT2;
CGAL_USE_TYPE(Coercion_type_NT1_NT2); CGAL_USE_TYPE(Coercion_type_NT1_NT2);
CGAL_static_assertion(( static_assert(::std::is_same<Coercion_type_NT1_NT2 , Type >::value);
::std::is_same<Coercion_type_NT1_NT2 , Type >::value));
typename Coercion_traits< NT1, NT2 >::Cast cast; typename Coercion_traits< NT1, NT2 >::Cast cast;
operator()( cast(x), cast(y), q, r ); operator()( cast(x), cast(y), q, r );

View File

@ -35,9 +35,9 @@
#define CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( NT, Result_type ) \ #define CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( NT, Result_type ) \
template < class CT_Type_1, class CT_Type_2 > \ template < class CT_Type_1, class CT_Type_2 > \
Result_type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { \ Result_type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { \
CGAL_static_assertion((::std::is_same< \ static_assert(::std::is_same< \
typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT \ typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT \
>::value)); \ >::value) ; \
\ \
typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; \ typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; \
return operator()( cast(x), cast(y) ); \ return operator()( cast(x), cast(y) ); \

View File

@ -85,13 +85,13 @@ public:
// determine extractable scalar factor // determine extractable scalar factor
Scalar operator () (const NT& a) { Scalar operator () (const NT& a) {
CGAL_static_assertion(( ::std::is_same< NT,Scalar >::value)); static_assert(::std::is_same< NT,Scalar >::value);
typedef typename Algebraic_structure_traits<NT>::Algebraic_category SAT; typedef typename Algebraic_structure_traits<NT>::Algebraic_category SAT;
return scalar_factor(a, SAT()); return scalar_factor(a, SAT());
} }
// determine extractable scalar factor // determine extractable scalar factor
Scalar operator () (const NT& a, const Scalar& d) { Scalar operator () (const NT& a, const Scalar& d) {
CGAL_static_assertion(( ::std::is_same< NT,Scalar >::value)); static_assert(::std::is_same< NT,Scalar >::value);
typedef typename Algebraic_structure_traits<NT>::Algebraic_category SAT; typedef typename Algebraic_structure_traits<NT>::Algebraic_category SAT;
return scalar_factor(a,d,SAT()); return scalar_factor(a,d,SAT());
} }

View File

@ -44,7 +44,7 @@
template <typename AdaptableFunctor, typename ResultType> template <typename AdaptableFunctor, typename ResultType>
void check_result_type(AdaptableFunctor, ResultType){ void check_result_type(AdaptableFunctor, ResultType){
typedef typename AdaptableFunctor::result_type result_type; typedef typename AdaptableFunctor::result_type result_type;
CGAL_static_assertion((::std::is_same<result_type,ResultType>::value)); static_assert(::std::is_same<result_type,ResultType>::value);
CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type);
} }
// check nothing for CGAL::Null_functor // check nothing for CGAL::Null_functor
@ -122,12 +122,11 @@ void test_algebraic_structure_intern( const CGAL::Integral_domain_tag& ) {
CGAL_SNAP_AST_FUNCTORS(AST); CGAL_SNAP_AST_FUNCTORS(AST);
using CGAL::Null_functor; using CGAL::Null_functor;
CGAL_static_assertion( static_assert(!::std::is_same< Integral_division, Null_functor >::value);
(!::std::is_same< Integral_division, Null_functor >::value)); static_assert(!::std::is_same< Divides, Null_functor >::value);
CGAL_static_assertion((!::std::is_same< Divides, Null_functor >::value)); static_assert(!::std::is_same< Is_zero, Null_functor >::value);
CGAL_static_assertion((!::std::is_same< Is_zero, Null_functor >::value)); static_assert(!::std::is_same< Is_one, Null_functor >::value);
CGAL_static_assertion((!::std::is_same< Is_one, Null_functor >::value)); static_assert(!::std::is_same< Square, Null_functor >::value);
CGAL_static_assertion((!::std::is_same< Square, Null_functor >::value));
// functor // functor
const Is_zero is_zero = Is_zero(); const Is_zero is_zero = Is_zero();
@ -206,7 +205,7 @@ void test_algebraic_structure_intern(
CGAL_SNAP_AST_FUNCTORS(AST); CGAL_SNAP_AST_FUNCTORS(AST);
using CGAL::Null_functor; using CGAL::Null_functor;
CGAL_static_assertion((!::std::is_same< Gcd, Null_functor>::value)); static_assert(!::std::is_same< Gcd, Null_functor>::value);
const Gcd gcd = Gcd(); const Gcd gcd = Gcd();
assert( gcd( AS ( 0), AS ( 0)) == unit_normal( AS (0) ) ); assert( gcd( AS ( 0), AS ( 0)) == unit_normal( AS (0) ) );
@ -268,9 +267,9 @@ void test_algebraic_structure_intern( const CGAL::Euclidean_ring_tag&) {
CGAL_SNAP_AST_FUNCTORS(AST); CGAL_SNAP_AST_FUNCTORS(AST);
using CGAL::Null_functor; using CGAL::Null_functor;
CGAL_static_assertion((!::std::is_same< Div, Null_functor>::value)); static_assert(!::std::is_same< Div, Null_functor>::value);
CGAL_static_assertion((!::std::is_same< Mod, Null_functor>::value)); static_assert(!::std::is_same< Mod, Null_functor>::value);
CGAL_static_assertion((!::std::is_same< Div_mod, Null_functor>::value)); static_assert(!::std::is_same< Div_mod, Null_functor>::value);
const Div div=Div(); const Div div=Div();
const Mod mod=Mod(); const Mod mod=Mod();
@ -387,7 +386,7 @@ void test_algebraic_structure_intern( const CGAL::Field_with_sqrt_tag& ) {
CGAL_SNAP_AST_FUNCTORS(AST); CGAL_SNAP_AST_FUNCTORS(AST);
CGAL_static_assertion((!::std::is_same< Sqrt, Null_functor>::value)); static_assert(!::std::is_same< Sqrt, Null_functor>::value);
const Sqrt sqrt =Sqrt(); const Sqrt sqrt =Sqrt();
AS a(4); AS a(4);
@ -613,11 +612,9 @@ class Test_is_square {
CGAL_USE_TYPE(First_argument_type); CGAL_USE_TYPE(First_argument_type);
CGAL_USE_TYPE(Second_argument_type); CGAL_USE_TYPE(Second_argument_type);
CGAL_static_assertion( static_assert(::std::is_same< AS , First_argument_type>::value);
( ::std::is_same< AS , First_argument_type>::value)); static_assert(::std::is_same< AS& , Second_argument_type>::value);
CGAL_static_assertion( //static_assert(::std::is_same< bool , Result_type>::value);
( ::std::is_same< AS& , Second_argument_type>::value));
//CGAL_static_assertion(( ::std::is_same< bool , Result_type>::value));
bool b = Result_type(true); CGAL_USE(b); bool b = Result_type(true); CGAL_USE(b);
AS test_number = AS(3)*AS(3); AS test_number = AS(3)*AS(3);
@ -649,8 +646,8 @@ public:
typedef typename Sqrt::result_type Result_type; typedef typename Sqrt::result_type Result_type;
CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Argument_type);
CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Result_type);
CGAL_static_assertion(( ::std::is_same< AS , Argument_type>::value)); static_assert(::std::is_same< AS , Argument_type>::value);
CGAL_static_assertion(( ::std::is_same< AS , Result_type>::value)); static_assert(::std::is_same< AS , Result_type>::value);
typedef Algebraic_structure_traits<AS> AST; typedef Algebraic_structure_traits<AS> AST;
typedef typename AST::Is_exact Is_exact; typedef typename AST::Is_exact Is_exact;
assert( !Is_exact::value || AS (3) == sqrt( AS (9))); assert( !Is_exact::value || AS (3) == sqrt( AS (9)));
@ -675,12 +672,9 @@ public:
CGAL_USE_TYPE(First_argument_type); CGAL_USE_TYPE(First_argument_type);
CGAL_USE_TYPE(Second_argument_type); CGAL_USE_TYPE(Second_argument_type);
CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Result_type);
CGAL_static_assertion( static_assert(::std::is_same<int, First_argument_type>::value);
( ::std::is_same<int, First_argument_type>::value)); static_assert(::std::is_same< AS , Second_argument_type>::value);
CGAL_static_assertion( static_assert(::std::is_same< AS , Result_type>::value);
( ::std::is_same< AS , Second_argument_type>::value));
CGAL_static_assertion(
( ::std::is_same< AS , Result_type>::value));
AS epsilon(1); AS epsilon(1);
assert( test_equality_epsilon( AS (2), assert( test_equality_epsilon( AS (2),
root( 4, AS (16) ), epsilon ) ); root( 4, AS (16) ), epsilon ) );
@ -803,7 +797,7 @@ void test_algebraic_structure(){
typedef CGAL::Algebraic_structure_traits< AS > AST; typedef CGAL::Algebraic_structure_traits< AS > AST;
CGAL_SNAP_AST_FUNCTORS(AST); CGAL_SNAP_AST_FUNCTORS(AST);
CGAL_static_assertion((::std::is_same<AS,typename AST::Type>::value)); static_assert(::std::is_same<AS,typename AST::Type>::value);
typedef typename AST::Boolean Boolean; typedef typename AST::Boolean Boolean;
assert(!Boolean()); assert(!Boolean());
@ -816,14 +810,13 @@ void test_algebraic_structure(){
using CGAL::Integral_domain_without_division_tag; using CGAL::Integral_domain_without_division_tag;
using CGAL::Null_functor; using CGAL::Null_functor;
// Test for desired exactness // Test for desired exactness
CGAL_static_assertion( static_assert(::std::is_same< typename AST::Is_exact, Is_exact >::value);
( ::std::is_same< typename AST::Is_exact, Is_exact >::value)); static_assert(::std::is_convertible< Tag,
Integral_domain_without_division_tag >::value );
static_assert(::std::is_same< Tag, Algebraic_category>::value);
static_assert(!::std::is_same< Simplify, Null_functor>::value);
static_assert(!::std::is_same< Unit_part, Null_functor>::value);
CGAL_static_assertion(( ::boost::is_convertible< Tag,
Integral_domain_without_division_tag >::value ));
CGAL_static_assertion(( ::std::is_same< Tag, Algebraic_category>::value));
CGAL_static_assertion((!::std::is_same< Simplify, Null_functor>::value));
CGAL_static_assertion((!::std::is_same< Unit_part, Null_functor>::value));
const Simplify simplify=Simplify();; const Simplify simplify=Simplify();;
const Unit_part unit_part= Unit_part(); const Unit_part unit_part= Unit_part();
@ -943,8 +936,7 @@ void test_algebraic_structure( const AS & a, const AS & b, const AS & c) {
typedef CGAL::Algebraic_structure_traits<AS> AST; typedef CGAL::Algebraic_structure_traits<AS> AST;
typedef typename AST::Is_numerical_sensitive Is_numerical_sensitive; typedef typename AST::Is_numerical_sensitive Is_numerical_sensitive;
CGAL_static_assertion( static_assert(!::std::is_same<Is_numerical_sensitive, CGAL::Null_tag>::value);
!(::std::is_same<Is_numerical_sensitive, CGAL::Null_tag>::value));
CGAL_USE_TYPE(Is_numerical_sensitive); CGAL_USE_TYPE(Is_numerical_sensitive);
} }

View File

@ -326,7 +326,7 @@ void test_implicit_interoperable_one_way() {
typedef typename CT::Type C; typedef typename CT::Type C;
typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable; typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable;
CGAL_static_assertion( static_assert(
(::std::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value)); (::std::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value));
assert((::std::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value)); assert((::std::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value));
@ -346,9 +346,9 @@ void test_explicit_interoperable_one_way(){
typedef typename CT::Cast Cast; typedef typename CT::Cast Cast;
typedef typename Cast::result_type result_type; typedef typename Cast::result_type result_type;
CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type);
CGAL_static_assertion((::std::is_same<result_type,Type>::value)); static_assert(::std::is_same<result_type,Type>::value);
CGAL_static_assertion((::std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); static_assert(::std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value);
CGAL_static_assertion((::std::is_same<Type,RT>::value)); static_assert(::std::is_same<Type,RT>::value);
typename CT::Cast cast; typename CT::Cast cast;
A a(3); A a(3);

View File

@ -37,11 +37,11 @@ void test_fraction_traits(){
typedef typename FT::Compose Compose; typedef typename FT::Compose Compose;
CGAL_USE_TYPE(Is_fraction); CGAL_USE_TYPE(Is_fraction);
CGAL_static_assertion( (::std::is_same<Type,T>::value)); static_assert(::std::is_same<Type,T>::value);
CGAL_static_assertion( (::std::is_same<Is_fraction,Tag_true>::value)); static_assert(::std::is_same<Is_fraction,Tag_true>::value);
CGAL_static_assertion(!(::std::is_same<Common_factor,Null_functor>::value)); static_assert(!::std::is_same<Common_factor,Null_functor>::value);
CGAL_static_assertion(!(::std::is_same<Decompose,Null_functor>::value)); static_assert(!::std::is_same<Decompose,Null_functor>::value);
CGAL_static_assertion(!(::std::is_same<Compose,Null_functor>::value)); static_assert(!::std::is_same<Compose,Null_functor>::value);
// Decompose // Decompose

View File

@ -29,7 +29,7 @@ void test_rational_traits(){
typedef Rational_traits<Rational> Rational_traits; typedef Rational_traits<Rational> Rational_traits;
typedef typename Rational_traits::RT RT; typedef typename Rational_traits::RT RT;
CGAL_static_assertion((::std::is_same<RT,RT>::value)); static_assert(::std::is_same<RT,RT>::value);
assert( Rational_traits().numerator(x) == RT(7)); assert( Rational_traits().numerator(x) == RT(7));
assert( Rational_traits().denominator(x) == RT(2)); assert( Rational_traits().denominator(x) == RT(2));

View File

@ -48,9 +48,9 @@ namespace CGAL {
void operator() (const ToDouble& to_double) { void operator() (const ToDouble& to_double) {
typedef typename ToDouble::argument_type Argument_type; typedef typename ToDouble::argument_type Argument_type;
typedef typename ToDouble::result_type Result_type; typedef typename ToDouble::result_type Result_type;
CGAL_static_assertion(( ::std::is_same<Type, Argument_type>::value)); static_assert( ::std::is_same<Type, Argument_type>::value);
CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Argument_type);
CGAL_static_assertion(( ::std::is_same<double, Result_type>::value)); static_assert( ::std::is_same<double, Result_type>::value);
CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Result_type);
assert(42.0 == to_double(Type(42))); assert(42.0 == to_double(Type(42)));
} }
@ -71,9 +71,9 @@ namespace CGAL {
typedef typename To_interval::argument_type Argument_type; typedef typename To_interval::argument_type Argument_type;
typedef typename To_interval::result_type Result_type; typedef typename To_interval::result_type Result_type;
typedef std::pair<double,double> Interval_type; typedef std::pair<double,double> Interval_type;
CGAL_static_assertion(( ::std::is_same<Type, Argument_type>::value)); static_assert( ::std::is_same<Type, Argument_type>::value);
CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Argument_type);
CGAL_static_assertion(( ::std::is_same<Interval_type, Result_type>::value)); static_assert( ::std::is_same<Interval_type, Result_type>::value);
CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Interval_type); CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Interval_type);
// assert(NiX::in(42.0,to_Interval(Type(42)))); // assert(NiX::in(42.0,to_Interval(Type(42))));
@ -139,7 +139,7 @@ void test_real_embeddable() {
CGAL_SNAP_RET_FUNCTORS(RET); CGAL_SNAP_RET_FUNCTORS(RET);
typedef typename RET::Is_real_embeddable Is_real_embeddable; typedef typename RET::Is_real_embeddable Is_real_embeddable;
using CGAL::Tag_true; using CGAL::Tag_true;
CGAL_static_assertion(( ::std::is_same< Is_real_embeddable, Tag_true>::value)); static_assert(::std::is_same< Is_real_embeddable, Tag_true>::value);
CGAL_USE_TYPE(Is_real_embeddable); CGAL_USE_TYPE(Is_real_embeddable);
typedef typename RET::Boolean Boolean; typedef typename RET::Boolean Boolean;
@ -246,7 +246,7 @@ void test_not_real_embeddable() {
typedef CGAL::Real_embeddable_traits<Type> RET; typedef CGAL::Real_embeddable_traits<Type> RET;
typedef typename RET::Is_real_embeddable Is_real_embeddable; typedef typename RET::Is_real_embeddable Is_real_embeddable;
using CGAL::Tag_false; using CGAL::Tag_false;
CGAL_static_assertion(( ::std::is_same< Is_real_embeddable, Tag_false>::value)); static_assert(::std::is_same< Is_real_embeddable, Tag_false>::value);
CGAL_USE_TYPE(Is_real_embeddable); CGAL_USE_TYPE(Is_real_embeddable);
} }
@ -254,13 +254,13 @@ void test_not_real_embeddable() {
//template <class Type, class CeilLog2Abs> //template <class Type, class CeilLog2Abs>
//void test_rounded_log2_abs(Type zero, CGAL::Null_functor, CeilLog2Abs) { //void test_rounded_log2_abs(Type zero, CGAL::Null_functor, CeilLog2Abs) {
// typedef CGAL::Null_functor Null_functor; // typedef CGAL::Null_functor Null_functor;
// CGAL_static_assertion(( ::std::is_same< CeilLog2Abs, Null_functor>::value)); // static_assert(::std::is_same< CeilLog2Abs, Null_functor>::value);
//} //}
// //
//template <class Type, class FloorLog2Abs, class CeilLog2Abs> //template <class Type, class FloorLog2Abs, class CeilLog2Abs>
//void test_rounded_log2_abs(Type zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) { //void test_rounded_log2_abs(Type zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) {
// typedef CGAL::Null_functor Null_functor; // typedef CGAL::Null_functor Null_functor;
// CGAL_static_assertion((!::std::is_same< CeilLog2Abs, Null_functor>::value)); // static_assert(!::std::is_same< CeilLog2Abs, Null_functor>::value);
// //
// assert( fl_log(Type( 7)) == 2 ); // assert( fl_log(Type( 7)) == 2 );
// assert( cl_log(Type( 7)) == 3 ); // assert( cl_log(Type( 7)) == 3 );

View File

@ -9,21 +9,21 @@ int main(){
typedef AET::Type Type; typedef AET::Type Type;
CGAL_USE_TYPE(Type); CGAL_USE_TYPE(Type);
CGAL_static_assertion((::std::is_same<int,Type>::value)); static_assert(::std::is_same<int,Type>::value);
typedef AET::Is_extended Is_extended; typedef AET::Is_extended Is_extended;
CGAL_USE_TYPE(Is_extended); CGAL_USE_TYPE(Is_extended);
CGAL_static_assertion( static_assert(
(::std::is_same<CGAL::Tag_false,Is_extended>::value)); (::std::is_same<CGAL::Tag_false,Is_extended>::value));
typedef AET::Normalization_factor Normalization_factor; typedef AET::Normalization_factor Normalization_factor;
{ {
typedef Normalization_factor::argument_type argument_type; typedef Normalization_factor::argument_type argument_type;
CGAL_USE_TYPE(argument_type); CGAL_USE_TYPE(argument_type);
CGAL_static_assertion((::std::is_same<argument_type,int>::value)); static_assert(::std::is_same<argument_type,int>::value);
typedef Normalization_factor::result_type result_type; typedef Normalization_factor::result_type result_type;
CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type);
CGAL_static_assertion((::std::is_same<result_type,int>::value)); static_assert(::std::is_same<result_type,int>::value);
Normalization_factor nfac; Normalization_factor nfac;
assert(nfac(3)==1); assert(nfac(3)==1);
} }
@ -31,10 +31,10 @@ int main(){
{ {
typedef DFAI::argument_type argument_type; typedef DFAI::argument_type argument_type;
CGAL_USE_TYPE(argument_type); CGAL_USE_TYPE(argument_type);
CGAL_static_assertion((::std::is_same<argument_type,int>::value)); static_assert(::std::is_same<argument_type,int>::value);
typedef DFAI::result_type result_type; typedef DFAI::result_type result_type;
CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type);
CGAL_static_assertion((::std::is_same<result_type,int>::value)); static_assert(::std::is_same<result_type,int>::value);
DFAI dfai; DFAI dfai;
assert(dfai(3)==1); assert(dfai(3)==1);
} }
@ -45,21 +45,21 @@ int main(){
typedef AET::Type Type; typedef AET::Type Type;
CGAL_USE_TYPE(Type); CGAL_USE_TYPE(Type);
CGAL_static_assertion((::std::is_same<EXT,Type>::value)); static_assert(::std::is_same<EXT,Type>::value);
typedef AET::Is_extended Is_extended; typedef AET::Is_extended Is_extended;
CGAL_USE_TYPE(Is_extended); CGAL_USE_TYPE(Is_extended);
CGAL_static_assertion( static_assert(
(::std::is_same<CGAL::Tag_true,Is_extended>::value)); (::std::is_same<CGAL::Tag_true,Is_extended>::value));
typedef AET::Normalization_factor Normalization_factor; typedef AET::Normalization_factor Normalization_factor;
{ {
typedef Normalization_factor::argument_type argument_type; typedef Normalization_factor::argument_type argument_type;
CGAL_USE_TYPE(argument_type); CGAL_USE_TYPE(argument_type);
CGAL_static_assertion((::std::is_same<argument_type,EXT>::value)); static_assert(::std::is_same<argument_type,EXT>::value);
typedef Normalization_factor::result_type result_type; typedef Normalization_factor::result_type result_type;
CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type);
CGAL_static_assertion((::std::is_same<result_type,EXT>::value)); static_assert(::std::is_same<result_type,EXT>::value);
Normalization_factor nfac; Normalization_factor nfac;
assert(nfac(EXT(3))==1); assert(nfac(EXT(3))==1);
assert(nfac(EXT(3,0,5))==1); assert(nfac(EXT(3,0,5))==1);
@ -69,10 +69,10 @@ int main(){
{ {
typedef DFAI::argument_type argument_type; typedef DFAI::argument_type argument_type;
CGAL_USE_TYPE(argument_type); CGAL_USE_TYPE(argument_type);
CGAL_static_assertion((::std::is_same<argument_type,EXT>::value)); static_assert(::std::is_same<argument_type,EXT>::value);
typedef DFAI::result_type result_type; typedef DFAI::result_type result_type;
CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type);
CGAL_static_assertion((::std::is_same<result_type,EXT>::value)); static_assert(::std::is_same<result_type,EXT>::value);
DFAI dfai; DFAI dfai;
assert(dfai(EXT(3))==1); assert(dfai(EXT(3))==1);
assert(dfai(EXT(3,0,5))==1); assert(dfai(EXT(3,0,5))==1);

View File

@ -7,7 +7,7 @@
{ \ { \
typedef AST::NAME NAME; \ typedef AST::NAME NAME; \
CGAL_USE_TYPE(NAME); \ CGAL_USE_TYPE(NAME); \
CGAL_static_assertion( \ static_assert( \
(::std::is_same<CGAL::Null_functor,NAME>::value)); \ (::std::is_same<CGAL::Null_functor,NAME>::value)); \
} }
@ -16,19 +16,19 @@ int main(){
typedef AST::Type Type; typedef AST::Type Type;
CGAL_USE_TYPE(Type); CGAL_USE_TYPE(Type);
CGAL_static_assertion((::std::is_same<void,Type>::value)); static_assert(::std::is_same<void,Type>::value);
typedef AST::Algebraic_category Algebraic_category; typedef AST::Algebraic_category Algebraic_category;
CGAL_USE_TYPE(Algebraic_category); CGAL_USE_TYPE(Algebraic_category);
CGAL_static_assertion( static_assert(
(::std::is_same<CGAL::Null_tag,Algebraic_category>::value)); (::std::is_same<CGAL::Null_tag,Algebraic_category>::value));
typedef AST::Is_exact Is_exact; typedef AST::Is_exact Is_exact;
CGAL_USE_TYPE(Is_exact); CGAL_USE_TYPE(Is_exact);
CGAL_static_assertion((::std::is_same<CGAL::Null_tag,Is_exact>::value)); static_assert(::std::is_same<CGAL::Null_tag,Is_exact>::value);
typedef AST::Is_numerical_sensitive Is_sensitive; typedef AST::Is_numerical_sensitive Is_sensitive;
CGAL_USE_TYPE(Is_sensitive); CGAL_USE_TYPE(Is_sensitive);
CGAL_static_assertion((::std::is_same<CGAL::Null_tag,Is_sensitive>::value)); static_assert(::std::is_same<CGAL::Null_tag,Is_sensitive>::value);
CGAL_IS_AST_NULL_FUNCTOR ( Simplify); CGAL_IS_AST_NULL_FUNCTOR ( Simplify);
CGAL_IS_AST_NULL_FUNCTOR ( Unit_part); CGAL_IS_AST_NULL_FUNCTOR ( Unit_part);

View File

@ -6,22 +6,17 @@ int main(){
{ {
typedef CGAL::Coercion_traits<int,int> CT; typedef CGAL::Coercion_traits<int,int> CT;
CGAL_USE_TYPE(CT); CGAL_USE_TYPE(CT);
CGAL_static_assertion(( std::is_same<CT::Type,int>::value)); static_assert( std::is_same<CT::Type,int>::value);
CGAL_static_assertion( static_assert( std::is_same<CT::Are_implicit_interoperable,CGAL::Tag_true>::value);
( std::is_same<CT::Are_implicit_interoperable,CGAL::Tag_true>::value)); static_assert( std::is_same<CT::Are_explicit_interoperable,CGAL::Tag_true>::value);
CGAL_static_assertion(
( std::is_same<CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
assert( 5 == CT::Cast()(5)); assert( 5 == CT::Cast()(5));
} }
{ {
typedef CGAL::Coercion_traits<CGAL::Tag_true,CGAL::Tag_false> CT; typedef CGAL::Coercion_traits<CGAL::Tag_true,CGAL::Tag_false> CT;
CGAL_USE_TYPE(CT); CGAL_USE_TYPE(CT);
// CGAL_static_assertion(( std::is_same<CT::Type,CGAL::Null_type>::value)); // static_assert( std::is_same<CT::Type,CGAL::Null_type>::value);
CGAL_static_assertion( static_assert(std::is_same<CT::Are_implicit_interoperable,CGAL::Tag_false>::value);
( std::is_same<CT::Are_implicit_interoperable,CGAL::Tag_false>::value)); static_assert(std::is_same<CT::Are_explicit_interoperable,CGAL::Tag_false>::value);
CGAL_static_assertion( static_assert(std::is_same<CT::Cast,CGAL::Null_functor>::value);
( std::is_same<CT::Are_explicit_interoperable,CGAL::Tag_false>::value));
CGAL_static_assertion(
( std::is_same<CT::Cast,CGAL::Null_functor>::value));
} }
} }

View File

@ -7,7 +7,7 @@
{ \ { \
typedef RET::NAME NAME; \ typedef RET::NAME NAME; \
CGAL_USE_TYPE(NAME); \ CGAL_USE_TYPE(NAME); \
CGAL_static_assertion( \ static_assert( \
(::std::is_same<CGAL::Null_functor,NAME>::value)); \ (::std::is_same<CGAL::Null_functor,NAME>::value)); \
} }
@ -16,11 +16,11 @@ int main(){
typedef RET::Type Type; typedef RET::Type Type;
CGAL_USE_TYPE(Type); CGAL_USE_TYPE(Type);
CGAL_static_assertion((::std::is_same<void,Type>::value)); static_assert(::std::is_same<void,Type>::value);
typedef RET::Is_real_embeddable Is_real_embeddable; typedef RET::Is_real_embeddable Is_real_embeddable;
CGAL_USE_TYPE(Is_real_embeddable); CGAL_USE_TYPE(Is_real_embeddable);
CGAL_static_assertion((::std::is_same<CGAL::Tag_false,Is_real_embeddable>::value)); static_assert(::std::is_same<CGAL::Tag_false,Is_real_embeddable>::value);
CGAL_IS_RET_NULL_FUNCTOR(Abs); CGAL_IS_RET_NULL_FUNCTOR(Abs);
CGAL_IS_RET_NULL_FUNCTOR(Sgn); CGAL_IS_RET_NULL_FUNCTOR(Sgn);

View File

@ -7,33 +7,31 @@
int main(){ int main(){
typedef CGAL::Scalar_factor_traits<int> SFT; typedef CGAL::Scalar_factor_traits<int> SFT;
CGAL_USE_TYPE(SFT); CGAL_USE_TYPE(SFT);
CGAL_static_assertion((::std::is_same<int, SFT::Type>::value)); static_assert(::std::is_same<int, SFT::Type>::value);
CGAL_static_assertion((::std::is_same<int, SFT::Scalar>::value)); static_assert(::std::is_same<int, SFT::Scalar>::value);
typedef SFT::Scalar_factor Scalar_factor; typedef SFT::Scalar_factor Scalar_factor;
{ {
typedef Scalar_factor::result_type result_type; typedef Scalar_factor::result_type result_type;
CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type);
CGAL_static_assertion((::std::is_same<int, result_type>::value)); static_assert(::std::is_same<int, result_type>::value);
typedef Scalar_factor::argument_type argument_type; typedef Scalar_factor::argument_type argument_type;
CGAL_USE_TYPE(argument_type); CGAL_USE_TYPE(argument_type);
CGAL_static_assertion((::std::is_same<int, argument_type>::value)); static_assert(::std::is_same<int, argument_type>::value);
} }
typedef SFT::Scalar_div Scalar_div; typedef SFT::Scalar_div Scalar_div;
{ {
typedef Scalar_div::result_type result_type; typedef Scalar_div::result_type result_type;
CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type);
CGAL_static_assertion((::std::is_same<void, result_type>::value)); static_assert(::std::is_same<void, result_type>::value);
typedef Scalar_div::first_argument_type first_argument_type; typedef Scalar_div::first_argument_type first_argument_type;
CGAL_USE_TYPE(first_argument_type); CGAL_USE_TYPE(first_argument_type);
CGAL_static_assertion( static_assert(::std::is_same<int&, first_argument_type>::value);
(::std::is_same<int&, first_argument_type>::value));
typedef Scalar_div::second_argument_type second_argument_type; typedef Scalar_div::second_argument_type second_argument_type;
CGAL_USE_TYPE(second_argument_type); CGAL_USE_TYPE(second_argument_type);
CGAL_static_assertion( static_assert(::std::is_same<int, second_argument_type>::value);
(::std::is_same<int, second_argument_type>::value));
} }
int i; int i;

View File

@ -7,7 +7,7 @@ A model of `AlgebraicKernel_d_1::ApproximateAbsolute_1` is an `AdaptableBinaryFu
approximation of an `AlgebraicKernel_d_1::Algebraic_real_1` value with approximation of an `AlgebraicKernel_d_1::Algebraic_real_1` value with
respect to a given absolute precision. respect to a given absolute precision.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicKernel_d_1::ApproximateRelative_1` \sa `AlgebraicKernel_d_1::ApproximateRelative_1`

View File

@ -7,7 +7,7 @@ A model of `AlgebraicKernel_d_1::ApproximateRelative_1` is an `AdaptableBinaryFu
approximation of an `AlgebraicKernel_d_1::Algebraic_real_1` value with approximation of an `AlgebraicKernel_d_1::Algebraic_real_1` value with
respect to a given relative precision. respect to a given relative precision.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicKernel_d_1::ApproximateAbsolute_1` \sa `AlgebraicKernel_d_1::ApproximateAbsolute_1`

View File

@ -7,7 +7,7 @@ Computes a number of type
`AlgebraicKernel_d_1::Bound` in-between two `AlgebraicKernel_d_1::Bound` in-between two
`AlgebraicKernel_d_1::Algebraic_real_1` values. `AlgebraicKernel_d_1::Algebraic_real_1` values.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
*/ */

View File

@ -5,7 +5,7 @@
Compares `AlgebraicKernel_d_1::Algebraic_real_1` values. Compares `AlgebraicKernel_d_1::Algebraic_real_1` values.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
*/ */
class AlgebraicKernel_d_1::Compare_1 { class AlgebraicKernel_d_1::Compare_1 {

View File

@ -6,7 +6,7 @@
Computes a square free univariate polynomial \f$ p\f$, such that the given Computes a square free univariate polynomial \f$ p\f$, such that the given
`AlgebraicKernel_d_1::Algebraic_real_1` is a root of \f$ p\f$. `AlgebraicKernel_d_1::Algebraic_real_1` is a root of \f$ p\f$.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `AlgebraicKernel_d_1::Isolate_1` \sa `AlgebraicKernel_d_1::Isolate_1`

View File

@ -5,7 +5,7 @@
Constructs `AlgebraicKernel_d_1::Algebraic_real_1`. Constructs `AlgebraicKernel_d_1::Algebraic_real_1`.
\cgalRefines `AdaptableFunctor` \cgalRefines{AdaptableFunctor}
\sa `AlgebraicKernel_d_2::ConstructAlgebraicReal_2` \sa `AlgebraicKernel_d_2::ConstructAlgebraicReal_2`

View File

@ -6,7 +6,7 @@
Determines whether a given pair of univariate polynomials \f$ p_1, p_2\f$ is coprime, Determines whether a given pair of univariate polynomials \f$ p_1, p_2\f$ is coprime,
namely if \f$ \deg({\rm gcd}(p_1 ,p_2)) = 0\f$. namely if \f$ \deg({\rm gcd}(p_1 ,p_2)) = 0\f$.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicKernel_d_1::MakeCoprime_1` \sa `AlgebraicKernel_d_1::MakeCoprime_1`

View File

@ -5,7 +5,7 @@
Computes whether the given univariate polynomial is square free. Computes whether the given univariate polynomial is square free.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `AlgebraicKernel_d_1::MakeSquareFree_1` \sa `AlgebraicKernel_d_1::MakeSquareFree_1`
\sa `AlgebraicKernel_d_1::SquareFreeFactorize_1` \sa `AlgebraicKernel_d_1::SquareFreeFactorize_1`

View File

@ -6,7 +6,7 @@
Computes whether an `AlgebraicKernel_d_1::Polynomial_1` Computes whether an `AlgebraicKernel_d_1::Polynomial_1`
is zero at a given `AlgebraicKernel_d_1::Algebraic_real_1`. is zero at a given `AlgebraicKernel_d_1::Algebraic_real_1`.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicKernel_d_1::SignAt_1` \sa `AlgebraicKernel_d_1::SignAt_1`

View File

@ -6,7 +6,7 @@
Computes an open isolating interval for an `AlgebraicKernel_d_1::Algebraic_real_1` Computes an open isolating interval for an `AlgebraicKernel_d_1::Algebraic_real_1`
with respect to the real roots of a given univariate polynomial. with respect to the real roots of a given univariate polynomial.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicKernel_d_1::ComputePolynomial_1` \sa `AlgebraicKernel_d_1::ComputePolynomial_1`

View File

@ -16,7 +16,7 @@ such that \f$ q_1\f$ and \f$ q_2\f$ are coprime.
It returns true if \f$ p_1\f$ and \f$ p_2\f$ are already coprime. It returns true if \f$ p_1\f$ and \f$ p_2\f$ are already coprime.
\cgalRefines `AdaptableFunctor` with five arguments \cgalRefines{AdaptableQuinaryFunction}
\sa `AlgebraicKernel_d_1::IsCoprime_1` \sa `AlgebraicKernel_d_1::IsCoprime_1`

View File

@ -5,7 +5,7 @@
Returns a square free part of a univariate polynomial. Returns a square free part of a univariate polynomial.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `AlgebraicKernel_d_1::IsSquareFree_1` \sa `AlgebraicKernel_d_1::IsSquareFree_1`
\sa `AlgebraicKernel_d_1::SquareFreeFactorize_1` \sa `AlgebraicKernel_d_1::SquareFreeFactorize_1`

View File

@ -5,7 +5,7 @@
Computes the number of real solutions of the given univariate polynomial. Computes the number of real solutions of the given univariate polynomial.
\cgalRefines `AdaptableUnaryFunction` \cgalRefines{AdaptableUnaryFunction}
\sa `AlgebraicKernel_d_1::ConstructAlgebraicReal_1` \sa `AlgebraicKernel_d_1::ConstructAlgebraicReal_1`

View File

@ -7,7 +7,7 @@ Computes the sign of a univariate polynomial
`AlgebraicKernel_d_1::Polynomial_1` at a real value of type `AlgebraicKernel_d_1::Polynomial_1` at a real value of type
`AlgebraicKernel_d_1::Algebraic_real_1`. `AlgebraicKernel_d_1::Algebraic_real_1`.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicKernel_d_1::IsZeroAt_1` \sa `AlgebraicKernel_d_1::IsZeroAt_1`

View File

@ -5,8 +5,7 @@
Computes the real roots of a univariate polynomial. Computes the real roots of a univariate polynomial.
\cgalRefines `Assignable` \cgalRefines{Assignable,CopyConstructible}
\cgalRefines `CopyConstructible`
*/ */

View File

@ -14,8 +14,7 @@ and a constant factor \f$ c\f$, such that
The factor multiplicity pairs \f$ <q_i,m_i>\f$ are written to the The factor multiplicity pairs \f$ <q_i,m_i>\f$ are written to the
given output iterator. The constant factor \f$ c\f$ is not computed. given output iterator. The constant factor \f$ c\f$ is not computed.
\cgalRefines `Assignable` \cgalRefines{Assignable,CopyConstructible}
\cgalRefines `CopyConstructible`
\sa `AlgebraicKernel_d_1::IsSquareFree_1` \sa `AlgebraicKernel_d_1::IsSquareFree_1`
\sa `AlgebraicKernel_d_1::MakeSquareFree_1` \sa `AlgebraicKernel_d_1::MakeSquareFree_1`

View File

@ -6,8 +6,7 @@
A model of the `AlgebraicKernel_d_1` concept is meant to provide the A model of the `AlgebraicKernel_d_1` concept is meant to provide the
algebraic functionalities on univariate polynomials of general degree \f$ d\f$. algebraic functionalities on univariate polynomials of general degree \f$ d\f$.
\cgalRefines `CopyConstructible` \cgalRefines{CopyConstructible,Assignable}
\cgalRefines `Assignable`
\cgalHasModel `CGAL::Algebraic_kernel_rs_gmpz_d_1` \cgalHasModel `CGAL::Algebraic_kernel_rs_gmpz_d_1`
\cgalHasModel `CGAL::Algebraic_kernel_rs_gmpq_d_1` \cgalHasModel `CGAL::Algebraic_kernel_rs_gmpq_d_1`

View File

@ -7,7 +7,7 @@ A model of `AlgebraicKernel_d_2::ApproximateAbsoluteX_2` is an `AdaptableBinaryF
approximation of the \f$ x\f$-coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2` value approximation of the \f$ x\f$-coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2` value
with respect to a given absolute precision. with respect to a given absolute precision.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicKernel_d_2::ApproximateRelativeX_2` \sa `AlgebraicKernel_d_2::ApproximateRelativeX_2`
\sa `AlgebraicKernel_d_1::ApproximateAbsolute_1` \sa `AlgebraicKernel_d_1::ApproximateAbsolute_1`

View File

@ -7,7 +7,7 @@ A model of `AlgebraicKernel_d_2::ApproximateAbsoluteY_2` is an `AdaptableBinaryF
approximation of the \f$ y\f$-coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2` value approximation of the \f$ y\f$-coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2` value
with respect to a given absolute precision. with respect to a given absolute precision.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicKernel_d_2::ApproximateRelativeY_2` \sa `AlgebraicKernel_d_2::ApproximateRelativeY_2`
\sa `AlgebraicKernel_d_1::ApproximateAbsolute_1` \sa `AlgebraicKernel_d_1::ApproximateAbsolute_1`

View File

@ -7,7 +7,7 @@ A model of `AlgebraicKernel_d_2::ApproximateRelativeX_2` is an `AdaptableBinaryF
approximation of the \f$ x\f$-coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2` value approximation of the \f$ x\f$-coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2` value
with respect to a given relative precision. with respect to a given relative precision.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicKernel_d_2::ApproximateAbsoluteY_2` \sa `AlgebraicKernel_d_2::ApproximateAbsoluteY_2`
\sa `AlgebraicKernel_d_1::ApproximateAbsolute_1` \sa `AlgebraicKernel_d_1::ApproximateAbsolute_1`

View File

@ -7,7 +7,7 @@ A model of `AlgebraicKernel_d_2::ApproximateRelativeY_2` is an `AdaptableBinaryF
approximation of the \f$ y\f$-coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2` value approximation of the \f$ y\f$-coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2` value
with respect to a given relative precision. with respect to a given relative precision.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicKernel_d_2::ApproximateAbsoluteY_2` \sa `AlgebraicKernel_d_2::ApproximateAbsoluteY_2`
\sa `AlgebraicKernel_d_1::ApproximateAbsolute_1` \sa `AlgebraicKernel_d_1::ApproximateAbsolute_1`

View File

@ -7,7 +7,7 @@ Computes a number of type
`AlgebraicKernel_d_1::Bound` in-between the first coordinates of two `AlgebraicKernel_d_1::Bound` in-between the first coordinates of two
`AlgebraicKernel_d_2::AlgebraicReal_2`. `AlgebraicKernel_d_2::AlgebraicReal_2`.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicKernel_d_2::BoundBetweenY_2` \sa `AlgebraicKernel_d_2::BoundBetweenY_2`

View File

@ -7,7 +7,7 @@ Computes a number of type
`AlgebraicKernel_d_1::Bound` in-between the second coordinates of two `AlgebraicKernel_d_1::Bound` in-between the second coordinates of two
`AlgebraicKernel_d_2::AlgebraicReal_2`. `AlgebraicKernel_d_2::AlgebraicReal_2`.
\cgalRefines `AdaptableBinaryFunction` \cgalRefines{AdaptableBinaryFunction}
\sa `AlgebraicKernel_d_2::BoundBetweenX_2` \sa `AlgebraicKernel_d_2::BoundBetweenX_2`

Some files were not shown because too many files have changed in this diff Show More