Inspired by one of the comments on this question I wanted to write this in my code because I may have made wrong assumptions that would need investigating if I ever port the code to a platform where the two types are not the same.
static_assert(typeid(float) == typeid(GLfloat), "GLfloat is unexpected type");
However that does not compile because error: call to non-constexpr function ‘bool std::type_info::operator==(const std::type_info&) const’
I can however write this :-
static_assert(sizeof(float) == sizeof(GLfloat), "GLfloat is unexpected size");
And it works just as expected. That will most likely be sufficient to give me a compile time error if my assumptions are wrong on a new platform but I was wondering if there was any way to achieve what I really wanted - to compare the actual types?