[common] C++20 Concepts for ponca#293
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #293 +/- ##
==========================================
+ Coverage 94.10% 94.20% +0.10%
==========================================
Files 86 84 -2
Lines 3340 3315 -25
Branches 264 263 -1
==========================================
- Hits 3143 3123 -20
+ Misses 196 191 -5
Partials 1 1
🚀 New features to boost your workflow:
|
|
Hi, I added a few more concepts. There are things that we can not check with concept unfortunately. For example, ProvidesMeanPosition should require barycenterLocal to be defined. However, this is intentionally protected so concept can not check this as this is not accessible. We can try a work around using a subclass but I am not sure this is worth doing. |
|
Another conflict: -> Ponca::Plane has an isApprox function inherited through 'Eigen::Hyperplane' Therefore, when a fitting is instantiated with both, one isApprox hides the other. In the case I found this, Planes::isApprox hides AlgebraicSphere::isApprox and fails the ProvidesAlgebraicSphere concept. We can not trick the compiler beacause AlgebraicSphere::isApprox is templated on 'any' type, hence we can not use an empty initializer... Because there are overload (although hidden), we can not check for '&T::isApprox' pattern... |
c054149 to
103d724
Compare
|
Hi, Here are a few more concepts. What's left:
Questions:
|
20ce509 to
71e78d8
Compare
Note: we can not check for return type or on non const point because PointBinding is a counterexample
The concept requires to provide access to the DataPoint.
Also add forgotten tests for other concepts...
- Line - First/Second Fundamental Componetns - Weingarten Map - Principal Curvatures
Also add concepts for static_assert in class space
af31e98 to
290c267
Compare
747a620 to
3572481
Compare
|
I gave it a go and modified the current proposition. I also modified the curvature estimator, as I believe it is an important feature. |
Hi,
This PR serves as a base for introducing concepts in the library. Note that it depends on #219 but some commits will drop once rebase.
This first commit introduces:
I suggest to start concept by the prefix "Is" or "Provides" because of current Ponca terminology.