groue / GRMustache

Flexible and production-ready Mustache templates for MacOS Cocoa and iOS
http://mustache.github.com/
MIT License
1.44k stars 190 forks source link

use of word "template" as variable name and Objective-C++ files #57

Closed andreacremaschi closed 11 years ago

andreacremaschi commented 11 years ago

Hi, "template" is a keyword in C++, so the compiler will raise errors if #import <GRMustache/GRMustache.h> in a .mm file. I'd suggest to change the variable name in something different, i.e. "mustacheTemplate". Thanks for the great library, anyway! ac

groue commented 11 years ago

Hi!

Please, can you tell me which line(s) of which file(s) have the C++ compiler complain?

andreacremaschi commented 11 years ago

sure:

example/Source-iOS/Pods/Headers/GRMustache/GRMustacheTemplateDelegate.h:109:50: Expected identifier
example/Source-iOS/Pods/Headers/GRMustache/GRMustacheTemplateDelegate.h:109:50: Expected ';' after method prototype
example/Source-iOS/Pods/Headers/GRMustache/GRMustacheTemplateDelegate.h:118:49: Expected identifier
example/Source-iOS/Pods/Headers/GRMustache/GRMustacheTemplateDelegate.h:118:49: Expected ';' after method prototype
example/Source-iOS/Pods/Headers/GRMustache/GRMustacheTemplateDelegate.h:136:40: Expected identifier
example/Source-iOS/Pods/Headers/GRMustache/GRMustacheTemplateDelegate.h:136:40: Expected ';' after method prototype
example/Source-iOS/Pods/Headers/GRMustache/GRMustacheTemplateDelegate.h:149:40: Expected identifier
example/Source-iOS/Pods/Headers/GRMustache/GRMustacheTemplateDelegate.h:149:40: Expected ';' after method prototype

or just create a blank project, #import <GRMustache/GRMustache.h> in AppDelegate.m and rename in AppDelegate.mm

groue commented 11 years ago

I'm reluctant to "fix" the old version of GRMustache you are using, and recommend that you upgrade your copy of GRMustache to its latest version. Tell me if upgrading would cause any trouble.

andreacremaschi commented 11 years ago

Not an issue to me, I found a workaround. I just wanted to let you know

groue commented 11 years ago

All right, then! Thanks for the information, Andrea, happy Mustache !