Hi Marc,
are you aware of scoped_channel_value? Here a small example:
// Create a double channel with range [-0.5 .. 0.5]
struct double_minus_half { static double apply() { return -0.5; } };
struct double_plus_half { static double apply() { return 0.5; } };
typedef scoped_channel_value<double, double_minus_half,
double_plus_half> bits64custom_t;
// channel_convert its maximum should map to the maximum
bits64custom_t x = channel_traits<bits64custom_t>::max_value();
assert(x == 0.5);
bits16 y = channel_convert<bits16>(x);
assert(y == 65535);
Let me know. If that doesn't help I'll dig deeper into your problem.
Regards,
Christian
> _______________________________________________
> Boost-users mailing list
>
Boost...@lists.boost.org
>
http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users