Boost logo

Boost :

Subject: Re: [boost] Making lots of compile FAIL tests
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2015-06-18 04:18:00


On 17.06.2015 16:57, Paul A. Bristow wrote:
> I've started to devise some tests to ensure that things that really should not compile, do in fact
> compile-fail.
>
> So far I've produced a few files with a single statement that should fail inside a int main(){}.
>
> But it's looking at though it will get pretty tedious pretty soon :-(
>
> (I see for example that Boost.Multiprecision has some 50-ish compile_fail items)
>
> Is there some slicker way of doing this?
>
Not in Boost right now. There are tools that match output of tools
against expectations set in a file (gcc has one in their test suite, and
clang has -verify) that are used to test compiler errors in test suites.
It would be cool if Boost provided access to such a tool for its own tests.

Sebastian


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk