This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
<snip> Or something like this is pretty clear, but not re-usable, and the extra "divide by zero" and "not integer constant" noise in the diagnostic might confuse some people more than it helps:
template <typename T, int p, int r> class discard_block { // constraints 0 <= r <= p enum { _Require_r_not_less_than_zero = (1/(0<=r)) }; enum { _Require_r_not_greater_than_p = (1/(r<=p)) }; };
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |