I'm looking for a reasonable approach to test C++ template based software, where I want to check template arguments. If the argument do not fit certain criteria, I want the compiler to issue an error. So far so good...
Now I want to test that invalid template parameters are indeed revoked by the compiler. I could setup a single test scenario and fiddle something within the build system (cmake) that tries to compile the scenario, but this sounds very painful. I think I'm not the first who tries to solve this. Some 10 years ago, I've used an approach, where I used a single file for multiple tests and enabled a single test with the preprocessor. But that's not very elegant either.
Any suggestions on how to solve this (best within my current tools-set: c++, cmake, boost-test, bash, python)?