Hi, it seems as if there might be a bug in the test file for Dnd Character.
I’d submitted a solution some time ago, which passed ok. But today the same solution was giving me an error message.
I downloaded the exercise and once again it worked just fine. I changed the code a bit and it kept working. But, once I submitted the code, it failed here on exercism.org.
The error message I get is the following:
“/tmp/dnd-character/dnd_character_test.cpp:11:51: error: expected template-name before ‘<’ token
11 | class IsBetweenMatcher : public Catch::MatcherBase {
| ^
/tmp/dnd-character/dnd_character_test.cpp:11:51: error: expected ‘{’ before ‘<’ token
In file included from /usr/local/include/catch2/matchers/catch_matchers.hpp:11,
from /usr/local/include/catch2/matchers/catch_matchers_all.hpp:23,
from /usr/local/include/catch2/catch_all.hpp:126,
from /tmp/dnd-character/dnd_character_test.cpp:3:
/tmp/dnd-character/dnd_character_test.cpp: In function ‘void CATCH2_INTERNAL_TEST_32()’:
/tmp/dnd-character/dnd_character_test.cpp:95:50: error: class template argument deduction failed:
95 | CHECK_THAT(result, IsBetweenMatcher(3, 18));”
It seems there might be a problem with this class isBetweenMatcher, which is used in the test cases.
As it worked locally, perhaps it’s something on a header file.