18 Jun
2015
18 Jun
'15
8:18 a.m.
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