Grrr .. why is C++ syntax so completely bad that most compilers cannot get it right??? Stupid committee trying to avoid extra keywords...
This works with gcc 4.2.1 and with clang 3.3: ((::std::string*)(&tmp))->::std::basic_string<char>::~basic_string<char>(); but not with: g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Instead I get this: /home/skaller/.felix/cache/text/home/skaller/felix/build/release/tools/flx_grep.cpp: In function ‘size_t RE2_decoder(void*, char*, size_t)’: /home/skaller/.felix/cache/text/home/skaller/felix/build/release/tools/flx_grep.cpp:24:77: error: expected class-name before ‘(’ token The funny thing is that the template: template<class T> void destroy (T *p) { p->~U; } usage: destroy<string>(); always works. Isn't there a standard template for that? Anyone know what the proper C++ syntax is? -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language