id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 4649,token_functions.hpp (220) : fix for warning C4127 conditional expression is constant,Andrew Macgregor ,jsiek,"MSVC gives a compiler warning for the following piece of code (starting at line 220) in token_functions.hpp: ---------- if (sizeof(char_type) == 1) return std::isspace(c) != 0; else return std::iswspace(c) != 0; ---------- The warning is obvious: warning C4127: conditional expression is constant The warning is causing automated project builds to fail when 'fail on warning' and /W4 (maximum warnings) are set. Please can you make the run-time check for sizeof(char_type)==1 into a compile-time check? A solution could be to change: ---------- if (sizeof(char_type) == 1) return std::isspace(c) != 0; else return std::iswspace(c) != 0; ---------- for something along the lines of ---------- return check_isspace::value_for(c); ---------- where check_isspace is defined as follows: ---------- template struct check_isspace { typedef typename traits::char_type char_type; static bool value_for(char_type c) { return std::iswspace(c)!=0; } }; template struct check_isspace { typedef typename traits::char_type char_type; static bool value_for(char_type c) { return std::isspace(c)!=0; } }; ---------- ",Bugs,closed,To Be Determined,tokenizer,Boost 1.44.0,Problem,fixed,isspace,