Closed craigbroadbear closed 6 years ago
Hi, could you provide the whole error message? There is not much I can do without it.
d:\tmp\wtlapp\wtlapp\twpp\strings.hpp(109): error C2589: '(': illegal token on right side of '::' 1>d:\tmp\wtlapp\wtlapp\twpp\strings.hpp(251): note: see reference to class template instantiation 'Twpp::Detail::Str
' being compiled 1>d:\tmp\wtlapp\wtlapp\twpp\strings.hpp(109): error C2062: type 'unknown-type' unexpected 1>d:\tmp\wtlapp\wtlapp\twpp\strings.hpp(109): error C2334: unexpected token(s) preceding ':'; skipping apparent function body 1>d:\tmp\wtlapp\wtlapp\twpp\strings.hpp(251): error C2143: syntax error: missing ')' before ';' 1>d:\tmp\wtlapp\wtlapp\twpp\strings.hpp(251): error C2059: syntax error: ')' 1>d:\tmp\wtlapp\wtlapp\twpp\strings.hpp(251): error C2238: unexpected token(s) preceding ';' 1>d:\tmp\wtlapp\wtlapp\twpp\strings.hpp(251): fatal error C1201: unable to continue after syntax error in class template definition 1>Done building project "wtlapp.vcxproj" -- FAILED.
Seems to be some sort of problem with std::numeric_limits
Do you, by any chance, include Windows.h
or WinDefs.h
before including twpp.hpp
? I think it is the following issue:
https://stackoverflow.com/questions/27442885/syntax-error-with-stdnumeric-limitsmax
It should be enough to either define NOMINMAX
, or not to include Windows.h
and WinDefs.h
, TWPP does that automatically.
Yep, I put a
before any headers and that did the trick. Looks like a nice library you have developed. Thankyou!
I get some baffling errors in strings.hpp 'unexpected tokens preceding ;'
c++ templates do confuse me, so I am not clear what the issue is.