geometry icon indicating copy to clipboard operation
geometry copied to clipboard

[util] move bounds to geometry::util

Open barendgehrels opened this issue 11 months ago • 1 comments

This is a follow up on numeric_cast - now for bounds - which is different and simpler because it was already a structure. It also adds unit tests for it. So bounds for Boost.Rational was stil necessary.

It also adds CMakeLists.txt for the folders which tests which were affected

barendgehrels avatar Mar 02 '24 16:03 barendgehrels

Thanks, I think util is a better place for this. We could also consider math.

With that said. What do you think about removing it after rewriting or deprecating algorithms using bounds? It's because the library supports any coordinate type even big numerical types with dynamic size that have no bounds, e.g. Boost.Mutiprecision. AFAIR in the past we made a decision to not use assign_inverse in the library. This utliity was left for backward compatibility and if it was used I'd consider this as a bug. What do you think?

Btw, C++14 has this: https://en.cppreference.com/w/cpp/language/attributes/deprecated

awulkiew avatar Mar 03 '24 11:03 awulkiew

Thanks, I think util is a better place for this. We could also consider math.

With that said. What do you think about removing it after rewriting or deprecating algorithms using bounds? It's because the library supports any coordinate type even big numerical types with dynamic size that have no bounds, e.g. Boost.Mutiprecision. AFAIR in the past we made a decision to not use assign_inverse in the library. This utliity was left for backward compatibility and if it was used I'd consider this as a bug. What do you think?

Btw, C++14 has this: https://en.cppreference.com/w/cpp/language/attributes/deprecated

Didn't answer this yet. But yes, it makes sense. We use it in some places, but not often. And yes, assign_inverse we can deprecate, I forgot it, but I guess it was mainly for spherical/geographic

barendgehrels avatar Mar 13 '24 17:03 barendgehrels

There was one comment but I don't think it will change the PR. Can it be approved? @awulkiew @vissarion

barendgehrels avatar Mar 22 '24 17:03 barendgehrels

lgtm thanks.

awulkiew avatar Mar 23 '24 20:03 awulkiew