template <long N>
struct construct_matched_t
{
- template <typename Images,typename Pred>
- static bool apply(any_image<Images>& img, Pred pred)
+ template <typename ...Images,typename Pred>
+ static bool apply(any_image<Images...>& img, Pred pred)
{
- if (pred.template apply<mp11::mp_at_c<Images, N-1>>())
+ if (pred.template apply<mp11::mp_at_c<any_image<Images...>, N-1>>())
{
- using image_t = mp11::mp_at_c<Images, N-1>;
+ using image_t = mp11::mp_at_c<any_image<Images...>, N-1>;
image_t x;
img = std::move(x);
return true;
template <>
struct construct_matched_t<0>
{
- template <typename Images,typename Pred>
- static bool apply(any_image<Images>&,Pred) { return false; }
+ template <typename ...Images,typename Pred>
+ static bool apply(any_image<Images...>&,Pred) { return false; }
};
// A function object that can be passed to apply_operation.
/// \brief Within the any_image, constructs an image with the given dimensions
/// and a type that satisfies the given predicate
-template <typename Images,typename Pred>
-inline bool construct_matched(any_image<Images>& img, Pred pred)
+template <typename ...Images,typename Pred>
+inline bool construct_matched(any_image<Images...>& img, Pred pred)
{
- constexpr auto size = mp11::mp_size<Images>::value;
+ constexpr auto size = mp11::mp_size<any_image<Images...>>::value;
return detail::construct_matched_t<size>::apply(img, pred);
}