Subject: Re: [boost] Unittest capability for meta-programs feedback request
From: Ben Robinson (icaretaker_at_[hidden])
Date: 2011-09-29 02:28:55
On Tue, Sep 27, 2011 at 11:30 PM, Dave Abrahams <dave_at_[hidden]> wrote:
> >> We already have an approach; it requires integration with the test
> >> system. Yes, it's imperfect, but it does do the kind of testing needed
> >> to see that MyComponent<int> is prohibited.
> I wouldn't advocate the technique for testing that a static assertion
> fails; what you're proposing in this thread is much better suited to
> that use case.
Excellent! Now I suppose I need to justify my implementation choices, as
well as demonstrate how the technique can be used through better examples.
I hope that once this technique is digested, the community will discover
surprising new ways to make use of it.
However, if you need to prove that something fails compilation (an
> altogether different problem), you can do it by having the testing
> system invert the result of running the compiler. For robustness you
> should also make sure that everything compiles successfully if you
> disable the specific trigger for the failure, and maybe check the error
Agreed, I have not added this capability to my current GNU Make build
system, but I certainly will. Thanks to everybody who explained this
approach to proving compilation failures.
Ben Robinson, Ph.D.
-- > Dave Abrahams > BoostPro Computing > http://www.boostpro.com > > > _______________________________________________ > Unsubscribe & other changes: > http://lists.boost.org/mailman/listinfo.cgi/boost >
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk