Re: [Cppcms-users] Why can't we use pointers in templates?
Brought to you by:
artyom-beilis
|
From: Lee E. <le...@el...> - 2013-12-10 19:35:16
|
you can use pointers if you typedef them in a header file before. with regard to most std::* types, they usually manage their memory internally and are not a peoblem passing by value, string behaves like that. בתאריך 10 בדצמ 2013 04:18, מאת "augustin" <aug...@ov...>: > Hello, > > cppcms_tmpl_cc does not allow us to use pointers within templates: the > template regex does not validate. > > For example, if I use something like this: > > <%= content.getPerson(r.id)->usFirst %> > > I get the compile error: > Error: Syntax error in command Inline Variable ... > > Is it considered good practice to load all strings into the > cppcms::base_content struct and not to rely on pointers to object that are > stored permanently into memory (stored in memory over many http requests > thanks to fast_cgi)? > As far as I can tell, it's the only practice available. > > thanks, > > augustin. > > > > ------------------------------------------------------------------------------ > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |