Re: what's the meaning of the warning "instantiated from here"

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

 



Hi hj,

> En, I followed the message, and find the warning description as: "xxxx
> will be initialized after".
> But I still cannot understand what the compiler want to tell me.

class Foo
{
public:
  Foo();

  int x;
  int y;
  int z;
};

Foo::Foo()
  :
  z(3),
  y(2),
  x(1)
{
}

Even though you specified the initialization list z, y then x, they will be
initialized x, y then z (as specified in the declaration order).

That's what the "xxxx will be initialized after" warning is telling you.

--Eljay


[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