This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Overloaded constructor resolution


I'm trying to compile some library code with GCC 2.95.2 but I keep getting 
an ambiguous constructor call.  Here is the error:

gauge.cpp: In method `void OWL::TGauge::SetBkgndColor(const OWL::TColor &)':
gauge.cpp:217: call of overloaded `TColor(unsigned int)' is ambiguous
../../Include/owl/color.h:458: candidates are: OWL::TColor::TColor(const 
OWL::TColor &) <near match>
../../Include/owl/color.h:468:                 OWL::TColor::TColor(long 
unsigned int)
../../Include/owl/color.h:478:                 OWL::TColor::TColor(long int)
../../Include/owl/color.h:509:                 OWL::TColor::TColor(short int)
make: *** [../../Obj/owlwfg/gauge.obj] Error 1

I've fixed the offending code with a cast, but I'm wondering why other 
compilers don't complain.  This code has been compiled with Borland and MS 
compilers.

---
Kenneth Haley <mailto:khaley@bigfoot.com>
Yahoo! Messenger -- http://profiles.yahoo.com/haleykd
Website  http://www.bigfoot.com/~khaley
PGP -- http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=khaley@bigfoot.com


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]