p-ranav / tabulate

Table Maker for Modern C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hitting some compilation errors (shadow variable, implicit cast)

austinkinross opened this issue · comments

Hey, great project! FYI I'm hitting these errors when I try to compile it in our project, that has fairly strict MSVC warnings enabled:

tabulate\single_include\tabulate\tabulate.hpp(6005,40): error C2220: the following warning is treated as an error
tabulate\single_include\tabulate\tabulate.hpp(6005,40): warning C4800: Implicit conversion from 'int' to bool. Possible information loss
tabulate\single_include\tabulate\tabulate.hpp(6005,40): message : consider using explicit cast or comparison to 0 to avoid this warning
tabulate\single_include\tabulate\tabulate.hpp(8423,34): warning C4456: declaration of 'word_wrapped_text' hides previous local declaration
tabulate\single_include\tabulate\tabulate.hpp(8393,8): message : see declaration of 'word_wrapped_text'

I'm using top-of-tree master.

Also seeing this. A patch like the one I've attached will make it compile, but these changes are by no means the "right" approach; the numeric sign issues are legit, potential problems.

tabulate.patch