Re: compile or not compile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eljay Love-Jensen wrote:
Hi Karol,

Okay, then do this:

-----------------------------
// SECOND_CASE
typedef int my_int;

class ALibraryClass
{

public:
   int foo(const my_int&)
       {
           return 0;
       }
   int foo(const bool&)
       {
           return 0;
       }
};

class BClientClass
{
   public:
   enum Items
   {
       item1=1000,
       item2=2000
   };
   void test()
   {
       ALibraryClass a;
       a.foo(int(BClientClass::item1));
   }
};

int main()
{
   BClientClass b;
   b.test();
   return 0;
}
-----------------------------

And everything should work as desired.

HTH,
--Eljay


Hi!

Casting in my case is no option because in real program I have many
lines like:
              a.foo(BClientClass::item1);

Greets,Karol

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux