compile error after including <unordered_map>

18 views
Skip to first unread message

Ali Rostami

unread,
May 13, 2024, 9:23:15 PM5/13/24
to cpputest
Hello everyone, I want to use cpputest for my cpp project.
When I add "#include <unordered_map>" to my test file, it doesn't compile.
I searched the group and GitHub, AFAIU I have to put this STL include before cpputest includes like this:

#include <unordered_map>
#include "CppUTest/TestHarness.h"

But unfortunately, it didn't help. I tested with cpputest-starter-project and I got the same problem.
Maybe the easiest way to reproduce the error is to use cyber-dojo, create a cpp project with cpputest and add
#include <unordered_map>

to a test file.

Bas Vodde

unread,
May 13, 2024, 9:25:02 PM5/13/24
to CppUTest

Hi Ali,

I just replied you on the issue on github.

Thanks,

Bas

--
You received this message because you are subscribed to the Google Groups "cpputest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cpputest/973b3aaf-993d-41e4-a274-89d7233579d6n%40googlegroups.com.

Ali Rostami

unread,
May 18, 2024, 2:28:09 AM5/18/24
to cpputest
Hi Bas
Yeah, thank you so much. 
PS: For other's reference, it's here.

Reply all
Reply to author
Forward
0 new messages