-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: use std::size_t as channel index type in nth_channel_view #659
base: develop
Are you sure you want to change the base?
fix: use std::size_t as channel index type in nth_channel_view #659
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #659 +/- ##
===========================================
- Coverage 82.12% 81.10% -1.03%
===========================================
Files 117 117
Lines 5355 5171 -184
===========================================
- Hits 4398 4194 -204
- Misses 957 977 +20 |
6121765
to
2626069
Compare
Changes have been rebased against the current However, the basic idea was to unify the channel index type, any while I could change @mloskot: |
How about re-implementing #include <type_traits>
#include <boost/mp11.hpp>
using namespace boost::mp11;
struct R {};
struct G {};
struct B {};
using rgb_t = mp_list<R, G, B>; // sample color space
using index_t = std::ptrdiff_t;
template <typename L>
struct num_channels
{
using type = typename mp_size<L>::type;
static constexpr index_t value = mp_size<L>::value;
};
static_assert(num_channels<rgb_t>::value == 3, ""); |
f0109b4
to
d745375
Compare
@striezel I've just noticed this PR received updates. What is the status of it? Do you want me to squeeze it for Boost 1.80? Today is a deadline for major changes. |
No. The two issues which I see are:
I don't see that I will be able to do this within the next one or two days, so there really is no need to rush this PR into Boost 1.80. It will be in Boost 1.81 then, I guess. |
Sure. No rush, no pressure, no worry. I'm very thankful for all your contributions. |
d745375
to
5fa0eb8
Compare
Rebase is done (force push from d745375 to 5fa0eb8). Next: Find other places where |
This unifies the channel index type in nth_channel_view and image_view::num_channels - the latter one already uses std::size_t. Fixes boostorg#373.
8821258
to
0f93276
Compare
Description
This unifies the channel index type in
nth_channel_view
andimage_view::num_channels
- the latter one already usesstd::size_t
.References
Fixes #373.
Tasklist