As I said, the compiler message should be read carefully. It is full of useful stuff, and people often overlook that.
rect.inl(81): error C2589: '(': illegal token on right side of '::'
The error is located in rect.inl, line 81. And it's about something that is between :: and (. The same error repeats for lines 82, 83 and 84. So it can't be anything but the
min and
max symbols.
The next step is to know why the compiler complains about them being "illegal tokens". I don't remember how I did, but there are two solutions:
- F12 in Visual Studio ("go to declaration"), if the IDE is smart enough, this puts you into windows.h, at a line that looks like "#define min ...".
- search the error on Google, which often ends on stackoverflow with a meaningful answer. Especially for errors like this one, that almost any Windows programer has encountered.
In both cases, the solution is immediate:
- in windows.h, #define min ... is inside a #ifndef NOMINMAX bloc
- if found on stackoverflow, the solution is probably given directly
The experience also takes an important part: this kind of silly error (illegal token on something that looks really harmful) is often caused by included headers that define macros with common names, which makes the preprocessor put a big mess in the following code.
I hope this answers your question.