Constrain distance function using is_iterator type trait#96
Constrain distance function using is_iterator type trait#96jeremy-murphy wants to merge 18 commits into
Conversation
|
Looks like this works in principle, now to add a unit test. (haha, so much for TDD...) |
|
One potential issue is that |
|
We should use |
|
The same restriction should probably be applied to |
Yeah, that's what I figured -- if it unconditionally uses |
OK, sure thing. |
|
@jeremy-murphy, hey, I started working on the unit test for #96. |
Signed-off-by: Amlal El Mahrouss <[email protected]>
Added a test for custom distance function using Foo struct.
|
Yeah, so I don't get why the unit test fails with: when |
|
I'll do |
|
If you're referring to the test then it is needed for |
Added overload for advance function to handle integers.
|
Ooooh so THIS is where you've been hiding @jeremy-murphy ahaha 😆 ❤️ |
|
Hi - any thoughts as to when I can/should pull this into my development branch? |
Sorry, @megyhazy, I've been really swamped the past few weeks. I still kind of am but this is one of my highest priorities. I'm just looking over it to check if I've missed anything. |
| @@ -1,4 +1,5 @@ | |||
| // Copyright (C) 2017 Michel Morin. | |||
| // Copyright (C) 2026 Jeremy W. Murphy | |||
There was a problem hiding this comment.
Are copyright comments like this actually still the done thing?
There was a problem hiding this comment.
From what I've seen and talked with joaquin, yes
distancewill match anything, which gets annoying when your geometry algorithm for distance is...distance.(Same goes for
advance.)Use
enable_ifto constrain both functions to types that satisfy the library's definition of an iterator withboost::is_iterator.