
7 Apr
2009
7 Apr
'09
8:09 a.m.
Eric Niebler wrote:
troy d. straszheim wrote:
I see some funny behavior when misusing _value:
[snip]
Which does compile.. but the docs say that _value requires an expression of zero arity.
Yep, it compiles, and yep, it violates the preconditions. I choose not to enforce the preconditions because doing so would cause extra template instantiations and lengthen compile times. As long as valid programs compile and do the right thing, I'm happy.
How about a macro BOOST_PROTO_EXTRA_CHECKING or something like that to have those kind of checks conditionally? Best Regards, Gevorg