The preferred way to check types with Google Test is:
std::any x = 73;
EXPECT_EQ(x.type(), typeid(double));
With recent versions of Google Test this gives a readable output like this:
Expected equality of these values:
x.type()
Which is: char
typeid(double)
Which is: double
With older versions (like 1.11) that still works properly, but only the output is not as readable.
Thanks a lot to Marek R and all the others who provided valuable input.