|
Boost : |
Subject: Re: [boost] Is there interest in unit testing both passing and failing BOOST_MPL_ASSERTs?
From: Ben Robinson (icaretaker_at_[hidden])
Date: 2011-09-15 03:54:29
>
> Yes. I am sold.
>
> I am pleased.
>
> One thing I'd like to clarify: I don't think anyone is talking about
> capturing general compilation failures and turning them into exceptions.
> That would be freakin' amazing if possible * but I'm pretty sure we're just
> talking about an exception with some type metadata (pretty-printed). It is
> equivalent to or can be #def'd into a static_assert.
>
> Correct, once a compiler error is thrown, it is too late to magically
convert that into a run-time exception. I am indeed talking about a
conditionally compiled macro(s), which would statically assert, or generate
a run-time exception, depending on a pre-processor defined flag.
> Thanks Abel & Ben, this will be a big help!
>
> Thank you for your insight into some additional benefits of this
capability. I had not considered the convenience of debugging an actual
run-time call stack vs. the compiler trace. I will design this library so
that by setting a single breakpoint in the library, it will always give
access to the call-stack leading up to the failed assertion.
> Cheers,
> Gordon
>
Ben Robinson, Ph.D.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk