
8 Dec
2008
8 Dec
'08
12:41 a.m.
From: Chris #ifdef MYDEBUG typedef NullErrorPolicy Policy; #else typedef throw_exception<my_exception> Policy; #endif
struct A {
bounded_int<int, 0, 100, Policy> a; bounded_int<int, 50, 100, Policy> b; bounded_int<int, 2, 3, Policy> c;
};
It would be the same for compiler optimization as unconstrained, wouldn't it? It should remove any useless code.
In theory yes, but in practice this is a difficult optimisation task -- see http://article.gmane.org/gmane.comp.lib.boost.devel/174845/ .