Commit 7cf850fc authored by Samuel Debionne's avatar Samuel Debionne Committed by Generic Bliss account for Control Software
Browse files

[CORE] Add view / const_view overload to get a specific type

parent 2f25f955
......@@ -19,9 +19,21 @@ using view_t = boost::gil::any_image_view<gray8_view_t, gray8s_view_t, gray16_vi
using const_view_t = typename view_t::const_t;
// Returns a mutable view
view_t view(frame& frm);
view_t view(frame const& frm);
template <typename View>
View view(frame const& frame)
return boost::variant2::get<View>(view(frame));
// Returns a const view
const_view_t const_view(frame const& frm);
template <typename View>
View const_view(frame const& frame)
return boost::variant2::get<View>(const_view(frame));
} //namespace lima
......@@ -10,7 +10,7 @@
using namespace lima;
namespace gil = boost::gil;
view_t lima::view(frame& frm)
view_t lima::view(frame const& frm)
return std::visit(
[&frm](auto view) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment