Re: declaration order of member variables in struct

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

 



I think Martin was asking why the usual exception to pre declaration doesn't apply. In defining a class or struct, you can normally use symbols before you declare them.
I don't know what makes this example different.

Michael Eager wrote:
Martin Ettl wrote:

template <int N, int Low=1, int Upp=N> struct Root {
static const int ret = Root<N,(down?Low:mean+1),(down?mean:Upp)>::ret;
                                     ^^^^     ^^^^     ^^^^ ^^^^

Neither down nor mean are defined before they are referenced.

...
Each symbol (variable or type) in C/C++ must be declared before it is used.



[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