Uh oh!
There was an error while loading. Please reload this page.
Constrain distance function using is_iterator type trait - #96
Conversation
jeremy-murphy
commented
May 13, 2026
Looks like this works in principle, now to add a unit test. (haha, so much for TDD...) |
Lastique
commented
May 13, 2026
One potential issue is that |
Lastique
commented
May 13, 2026
We should use |
Lastique
commented
May 13, 2026
The same restriction should probably be applied to |
jeremy-murphy
commented
May 13, 2026
Yeah, that's what I figured -- if it unconditionally uses |
jeremy-murphy
commented
May 13, 2026
OK, sure thing. |
amlel-el-mahrouss
commented
May 14, 2026
@jeremy-murphy, hey, I started working on the unit test for #96. |
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Added a test for custom distance function using Foo struct.
Yeah, so I don't get why the unit test fails with: when |
Uh oh!
There was an error while loading. Please reload this page.
jeremy-murphy
commented
May 14, 2026
I'll do |
Lastique
commented
May 19, 2026
If you're referring to the test then it is needed for |
Added overload for advance function to handle integers.
Uh oh!
There was an error while loading. Please reload this page.
Becheler
commented
May 23, 2026
Ooooh so THIS is where you've been hiding @jeremy-murphy ahaha 😆 ❤️ |
megyhazy
commented
May 31, 2026
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
Uh oh!
There was an error while loading. Please reload this page.
jeremy-murphy
commented
Jun 22, 2026
Thanks for merging, @Lastique, glad I could make Boost.Iterator just that little bit easier to use. 😅 |
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.