baylej / tmx

C tmx map loader
http://libtmx.rtfd.io/
BSD 2-Clause "Simplified" License
241 stars 54 forks source link

Fix compiling with C++ #35

Closed arves100 closed 6 years ago

arves100 commented 6 years ago

"template" is a reserved keyword in C++, when trying to include tmx.h in C++ files, it throws an error. This commit renames "template" into "_template" to fix that error.

Tested with Visual C++ 15.8.9.

baylej commented 6 years ago

I guess we can thank VisualStudio for being a c++ only compiler... I don't quite like the new name you choose, because a member whose name is prefixed by a underscore usually means that that member is private. Maybe template_ref could fit here?