[C++-sig] Problem with identifying polymorphic types on Mac OS (original) (raw)

J. Michael Owen mikeowen at llnl.gov
Thu Dec 15 02:05:14 CET 2005


Hi Ralf,

Sadly the type I'm exposing is the std::pair, so I can't just modify
its source in this way. I'm going to have to work around this problem
by altering my code to not use std::pair<double, string>. It turns out
that std::pair<string, double> works without a problem. ??

I notice your compiler guards only screen out Apple's gcc 3.3 version
-- does that mean that the newer gcc you can get with OS X 10.4 does
not have this issue?

Thanks Ralf!

Mike.

Hi Mike,

It is a bogus error message I have been struggling with for some time. Here is one of my typical workarounds: class something { // lots of code... private: _#if defined(APPLE) && defined(MACH) _ && defined(GNUC) && GNUC == 3 && GNUCMINOR == 3 bool dummy; #endif uctbx::unitcell unitcell; fractional<> originalsite; const wyckoff::position* position; rtmx symop; }; I.e. simply adding a dummy bool as a member is typically enough to make the compiler happy. I've not been able to figure out what exactly causes the bogus error message. If anyone knows I'd be glad to learn about it. Cheers, Ralf

"Hey...where are the sunflower seeds?" | J. Michael Owen o_o / | (") | /'/ | ((,,)_________________________________________________________


-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1617 bytes Desc: not available URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20051214/352ffdd8/attachment.bin>



More information about the Cplusplus-sig mailing list