CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.85k stars 1.38k forks source link

Free functions and functors in the Kernel. #1912

Open sloriot opened 7 years ago

sloriot commented 7 years ago

It would be nice that we go over all of kernel function objects and add one free function overload for each kernel function object. Also, systematically having a see also link to the free function in the Concept documentation would be great to have. If we do that we should probably also update the developer manual to mention that a free function overload should be systematically available.

@lrineau what do you think?

lrineau commented 7 years ago

I agree. Do we have a way to test that more or less automatically?

efifogel commented 7 years ago

All these free functions should accept a kernel as an optional parameter. More precisely, have an overload that accepts a kernel. This is important in case the kernel has state data. In the "2D Arrangement" package for example, there are traits that maintain state. So if do something automatic, we may do this as well.


//) o /__ // (__ ( ( ( (/ (/-(-'(/ /

On 20 February 2017 at 13:24, Laurent Rineau notifications@github.com wrote:

I agree. Do we have a way to test that more or less automatically?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CGAL/cgal/issues/1912#issuecomment-281054652, or mute the thread https://github.com/notifications/unsubscribe-auth/AGoWuEzgCB86bjy1I2gNum6izXIqTTGIks5reXfpgaJpZM4MF5ZU .

sloriot commented 7 years ago

maybe we can use interface_macros.h but I'm a bit pessimistic since free functions overload can be for 2D and 3D points for example.

sloriot commented 7 years ago

@efifogel I think this is a good idea if it is possible.

lrineau commented 6 years ago

I suggest we close this issue, because:

sloriot commented 6 years ago

From a user point of view, like @MoniqueTeillaud would say, it's a mess. What's the logic for having or not having a free function?

lrineau commented 6 years ago

I do not know. I do not really care either, because I try not to use the free functions.

Maybe with bit of a clang tooling we can add all the missing functions. And as for testing them... no idea.