27 #include <mln/core/concept/image.hh>
28 #include <mln/value/concept/all.hh>
29 #include <mln/trait/op/plus.hh>
30 #include <mln/value/builtin/all.hh>
40 struct my_image2d :
Image< my_image2d<T> >
48 typedef dummy_t domain_t;
50 typedef dummy_t
psite;
51 typedef dummy_t piter;
55 bool has(
const psite& )
const {
return false; }
56 bool is_valid()
const {
return true; }
58 typedef dummy_t t_eligible_values_set;
59 const t_eligible_values_set& values_eligible()
const {
return dummy; }
61 typedef dummy_t t_values_space;
62 const t_values_space& values_space()
const {
return dummy; }
64 typedef dummy_t
value;
65 typedef dummy_t rvalue;
66 typedef dummy_t lvalue;
68 rvalue operator()(
const psite& )
const {
return dummy; }
69 lvalue operator()(
const psite& ) {
return dummy; }
71 const domain_t& domain()
const {
return dummy; }
73 typedef dummy_t skeleton;
75 void init_(
const dummy_t&) {};
93 template <
typename I,
typename J>
94 struct set_binary_< op::
plus, Image, I, Image, J >
102 template <
typename T,
typename U>
103 struct set_precise_binary_< op::
plus, my_image2d<T>, my_image2d<U> >
105 typedef mln_trait_op_plus(
T, U) V;
106 typedef my_image2d<V>&
ret;
117 mln_trait_op_plus_(
int,
float) tmp;
122 my_image2d<float> ima;
123 my_image2d<float>* ptr = &ima;
124 mln_trait_op_plus_(my_image2d<int>, my_image2d<float>) tmp = *ptr;