Commit Graph

30 Commits

Author SHA1 Message Date
Laurent Rineau 2bb3f9a0d3 make_array is not useful here 2024-04-19 17:24:24 +02:00
Laurent Rineau 50c9740cff fix the use of rvalue references 2024-03-27 23:18:33 +01:00
Laurent Rineau d6c39e52bd fixes
Use:
  - perfect forwarding in objects of the kernel (`Point_2`, `Point_3`,
    `Vector_2`, `Vector_3`), and also in `PointC2`, and `PointC3`
    (that forward to the equivalent vector)
  - constructors with rvalue references in `VectorC2` and `VectorC3`.
2024-03-27 15:56:03 +01:00
Sébastien Loriot fbd24d665d add version for Point_2/Vector_2 2023-10-09 12:30:37 +02:00
Sébastien Loriot cca0a1942f workaround issue with intel compiler
Cartesian_kernel/include/CGAL/Cartesian/Line_3.h(38): error: incomplete type is not allowed
      Point_3 first;
              ^
2022-04-12 16:14:39 +02:00
Sébastien Loriot 8bb22d5b2c extra run of the script to remove tabs and trailing whitespaces
right after the merge of the 5.0 release branch

+ manual fix of the files (indentation was changed in the meantime):
   * Spatial_sorting/include/CGAL/Multiscale_sort.h
   * Spatial_sorting/test/Spatial_sorting/test_multiscale.cpp
2020-03-26 14:26:59 +01:00
Marc Glisse 3ebe8839b6 swap for Point_2 and Point_d
and make the implementations more similar, in case someone wants to
replace it with a macro at some point.
2020-03-01 12:50:13 +01:00
Sébastien Loriot 52164b1fba First pass on removing license notice in header for LGPL files 2019-10-19 15:40:30 +02:00
Sébastien Loriot 7356421d80 introduce Commercial license SPDX tag 2019-10-19 12:15:19 +02:00
Sébastien Loriot 9bd9c68b83 update LGPL[23]+ and GPL[23]+ SPDX tags
ack -l --no-svg "SPDX-License-Identifier: GPL-3.0\+" | xargs sed -i "s/SPDX-License-Identifier: GPL-3.0+/SPDX-License-Identifier: GPL-3.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: LGPL-3.0\+" | xargs sed -i "s/SPDX-License-Identifier: LGPL-3.0+/SPDX-License-Identifier: LGPL-3.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: GPL-2.0\+" | xargs sed -i "s/SPDX-License-Identifier: GPL-2.0+/SPDX-License-Identifier: GPL-2.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: LGPL-2.0\+" | xargs sed -i "s/SPDX-License-Identifier: LGPL-2.0+/SPDX-License-Identifier: LGPL-2.0-or-later/"
2019-10-18 21:57:54 +02:00
Sébastien Loriot 124012d9f9 replace cpp11::array by std::array 2019-03-29 13:28:33 +01:00
Sébastien Loriot 0698f79aff add SPDX identifier for files under the LGPL-3+ license 2017-11-12 10:17:50 +01:00
Laurent Rineau 3e4fcd8d90 Fix compilation error with gmpxx
That is a follow-up to the following commit:

> commit 6b51b12ab5
> Author: Laurent Rineau <laurent.rineau@cgal.org>
> Date:   Fri Oct 4 16:42:13 2013 +0200
>
>     Fix the case when FT is mpq_class
>
>     If x and w are mpq_class objects, then the type of x/w is not mpq_class,
>     but only a proxy type that is implicitly convertible to
>     mpq_class. With the type deduction, CGAL::make_array(x/w, y/w,
>     z/w) will not create an array<mpq_class> but an array of the proxy type.
>
>     That creates the following compilation error, in a ternary operator:
>
>     - with clang:
>     include/CGAL/Cartesian/Vector_3.h:78:25: error: incompatible operand types ('array<__gmp_expr<[...], struct __gmp_binary_expr<class __gmp_expr<mpq_t, mpq_t>, class __gmp_expr<mpq_t, mpq_t>, struct __gmp_binary_divides>>, [...]>' and 'array<__gmp_expr<[...], __mpq_struct [1]>, [...]>')
>         : base( w != FT_(1) ? CGAL::make_array(x/w, y/w, z/w)
>                             ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     - with g++:
>     include/CGAL/Cartesian/Vector_3.h:78:25: error: no match for ternary 'operator?:' (operand types are 'bool', 'std::array<__gmp_expr<__mpq_struct [1], __gmp_binary_expr<__gmp_expr<__mpq_struct [1], __mpq_struct [1]>, __gmp_expr<__mpq_struct [1], __mpq_struct [1]>, __gmp_binary_divides> >, 3ul>', and 'std::array<__gmp_expr<__mpq_struct [1], __mpq_struct [1]>, 3ul>')
>          : base( w != FT_(1) ? CGAL::make_array(x/w, y/w, z/w)
>                              ^
>
>     The fix is to specify the template argument of CGAL::make_array.

The first patch in 2013 was on `Vector_3`, but `Vector_2` also suffers
from the issue.
2016-07-13 16:30:07 +02:00
Andreas Fabri b7f9849599 Replace CGAL::get() with CGAL::get_pointee_or_identity() and remove using get:: 2015-04-30 11:31:21 +02:00
Sébastien Loriot 82b2ebc865 apply the cpp0x namespace renaming in all files 2012-12-19 11:33:17 +01:00
Sébastien Loriot 91a5327fa8 change LGPLv2 -> LGPLv3 2011-10-10 13:48:25 +00:00
Sébastien Loriot dff6dda8b3 Remove from copyright holder
Freie Universitaet Berlin (Germany), Martin-Luther-University Halle-Wittenberg
(Germany) and RISC Linz (Austria) as they transfer the copyright to other
sites.
2011-09-21 19:46:31 +00:00
Sébastien Loriot 52317dd49f add python script (replace_CGAL_NAMESPACE.py) to replace CGAL_BEGIN_NAMESPACE and CGAL_END_NAMESPACE
by namespace CGAL { and } //namespace CGAL. in all .h and .cpp files
in a directory.
Apply it to all packages in the trunk
Remove macro definition from the config.h file.
2010-06-09 07:37:13 +00:00
Sylvain Pion f0ed774e37 Move CGAL::array to namespace CGAL::cpp0x, like tuple. 2009-04-30 14:03:52 +00:00
Sylvain Pion 53f5c9679b Add a using directive "using std::array" in namespace CGAL to import either:
- C++0x's std:array from <array>
- TR1's std::tr1::array from <tr1/array>
- boost::array from <boost/array.hpp>
Motivation : GCC's std::array is faster than boost::array.

Move CGALi:make_array to namespace CGAL.

Document CGAL::array.
2008-08-26 13:08:16 +00:00
Sylvain Pion 3c37473d47 Qualify get() with CGAL:: and add missing header <CGAL/Handle_for.h>. 2008-06-17 08:13:11 +00:00
Sylvain Pion 11bbf3e2de Vector_2 and Vector_3 now also provide a Cartesian_const_iterator. 2008-04-09 17:58:57 +00:00
Sylvain Pion ccff0db36d Use new style with make_array(), more compact and efficient 2008-04-09 14:25:17 +00:00
Sylvain Pion cab843595b Replace {Two|Three|Four}tuple<FT> or <RT> by boost::array.
It makes more code parameterized by the dimension as template argument.
It provides iterators and a few basic functions already such as operator==...
I added CGALi::make_array() to easily and efficiently construct them.
2008-04-09 11:44:28 +00:00
Sylvain Pion 7f0f39cd1a Use constant<FT,int> to compute .hw() and make it return by const-ref. 2006-08-08 15:38:23 +00:00
Sylvain Pion 0e7340c184 Move Vector_2 I/O to user class level 2006-08-05 22:34:47 +00:00
Sylvain Pion 04b834db9a Move .transform() functions to the "user classes" level. 2006-08-01 09:08:28 +00:00
Laurent Saboret db6a8f948c Change CVS keywords to SVN style 2006-02-16 14:30:13 +00:00
Laurent Saboret 1aad55d4cb Change CVS keywords to SVN style 2006-02-14 10:08:15 +00:00
Laurent Saboret b52b8ef93f Move packages to trunk root 2006-02-14 08:58:13 +00:00