CVB++ 15.0
detail_scatter_access_helper.hpp
1#pragma once
2
3#include <algorithm>
4
5#include "../shims/stdvariant.hpp"
6
7#include "../_decl/decl_array_access.hpp"
8#include "../_decl/decl_linear_access.hpp"
9#include "../_decl/decl_vpat.hpp"
10#include "../_decl/decl_scatter_access.hpp"
11
12namespace Cvb
13{
14
15 CVB_BEGIN_INLINE_NS
16
17 namespace Internal
18 {
19 template <class FITER>
20 inline bool AllValid(FITER first, FITER last)
21 {
22 return std::all_of(first, last, [](const AccessVariant &plane) {
24 return get<ArrayAccess>(plane).Valid();
25 else if (holds_alternative<LinearAccess>(plane))
26 return get<LinearAccess>(plane).Valid();
27 else
28 return get<VpatAccess>(plane).Valid();
29 });
30 }
31
32 } // namespace Internal
33
34 CVB_END_INLINE_NS
35
36} // namespace Cvb
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
bool holds_alternative(const variant< TS... > &var) noexcept
Gets whether the Shims::variant var holds an instance of type T.
Definition variant.hpp:567