On 10/02/2013, at 9:26 PM, James Dennett wrote: >> >> ((::std::string*)(&tmp))->::std::basic_string<char>::~basic_string<char>();
> I think it's a gcc 4.6.3 bug that it doesn't accept your original > code, but that's overcomplicated code anyway. Yeah. But I tried a lot of other things and that one "worked for me". It took hours to get something that worked at all (on my Mac). > > Here are some options that work with gcc 4.6.3 and clang 3.0 at least: > ((::std::string*)(&tmp))->std::basic_string<char>::~basic_string(); > ((::std::string*)(&tmp))->~basic_string<char>(); > ((::std::string*)(&tmp))->~basic_string(); > Qualification is unnecessary as the lookup starts in ::std::string, Ah good point. > and the injected class name is implicitly basic_string<char>. So you can drop the "char". Weird though: string *px = ... px -> ~basic_string(); declare it as a string .. destroy as a basic_string :) -- 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