Commit Graph

11 Commits

Author SHA1 Message Date
Sébastien Loriot 120d94a4cf add new test for documented named parameters 2021-11-01 09:39:51 +01:00
Mael Rouxel-Labbé 2556196dad Merge remote-tracking branch 'cgal/master' into CGAL-Optimal_bounding_box-GF 2020-03-23 08:59:49 +01:00
Mael Rouxel-Labbé 3864f6da9d Add an overload of choose_parameter to avoid needless constructions 2020-03-12 22:20:06 +01:00
Mael Rouxel-Labbé 26463ded7a Update NPs using default constructed default values to new API
+ misc cleaning
2020-02-28 11:55:17 +01:00
Mael Rouxel-Labbé 338089b2a5 Add an overload of choose_parameter with a single parameter
The previous (and only) overload of choose_parameter required two parameters,
with the default parameter often being a default constructed object
of type the type of the object being passed in named parameter.
For example:

typedef typename CGAL::GetPointMap<PointRange, NamedParameters>::type Point_map;
Point_map pm = choose_parameter(get_parameter(np, internal_np::point_map),
				Point_map());

However, this can be unpleasant, for example when passing functors that have
an underlying lambda such (function_property_map, ...) because lambdas
cannot be default constructed.

With the new API:

typedef typename CGAL::GetPointMap<PointRange, NamedParameters>::type Point_map;
Point_map pm = choose_parameter<Point_map>(get_parameter(np, internal_np::point_map));

all is well.
2020-02-28 11:48:41 +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 67ce5dd976 add code to prevent silent bad usage of boost::get_param 2019-09-04 15:59:44 +02:00
Mael Rouxel-Labbé ae44cf3ff9 Do not return a const& for Named Parameters' default values
Since 'd' is in general some default constructed value, things can get weird,
for example with default constructed std::function
2019-07-23 11:58:21 +02:00
Sébastien Loriot 560c77f567 rename named function parameter class 2019-07-15 06:25:02 +02:00