IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Advocacy aside:
Is the code as presented correct, or has the developer done something that can only be expected to work in certain implementations (gcc 2.95.2, 2.95.4, 3.2.1, and MSVC 6, in this case)?
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New My understanding is:
A reference should be forward reference-able. That is, one should be able to create a reference to a class that is forward referenced. I think the "problem" here is the template. In order to create an object of a templated type, many compilers want to know the innards of the passed-in type(s) (i.e. the template types). What I suspect has happened here is that your Intel compiler has attempted to early-resolve the type T in the 'CBDCachedAllocator' type, and finding it forward-referenced short cut the process by (perhpas temporarily?) resolving it as void. This dodge might actually work most of the time...until you try to create a reference to the type, at which point the more sane part of the compiler rises up and smites you. A proper template implementation would attempt to forward-ref the templated type until class T could be resolved.

So in answer to your question, the construct as presented shoupd be syntactically correct (so long as the full definition of 'Section' is visible before the end of the compilation unit).
jb4
"They lead. They don't manage. The carrot always wins over the stick. Ask your horse. You can lead your horse to water, but you can't manage him to drink."
Richard Kerr, United Technologies Corporation, 1990
     More C++ BS: - (admin) - (21)
         OK, the problem here is the implementation, not the language - (jb4) - (10)
             Oh, come the heck on! Yes, it IS the language! - (CRConrad) - (7)
                 C'mon Christian... - (jb4) - (6)
                     Not that big a stretch... - (admin)
                     So, it's a great language, if your definition... - (CRConrad) - (1)
                         NO, that's NOT what I said. - (jb4)
                     Yeah, its the language - (tuberculosis) - (2)
                         Re: Yeah, its the language - (jb4) - (1)
                             Yes. -NT - (inthane-chan)
             Advocacy aside: - (admin) - (1)
                 My understanding is: - (jb4)
         Update: test code: try the fun on YOUR c++ compiler! - (admin) - (5)
             Borland C++ Builder 6 Pro compiles w/o error - (jb4) - (3)
                 Nifty for Windows users, eh? -NT - (admin) - (2)
                     In Linux-land, try Kylix... - (jb4) - (1)
                         I'll take a look then. -NT - (admin)
             GCC on Jaguar (3.1) works okay -NT - (tjsinclair)
         Update: what I did to workaround this - (admin) - (3)
             LUCK!!! ;-) -NT - (jb4)
             OT: gcc 2.95 native STL is very bad - (Arkadiy) - (1)
                 I'm not using native 2.95 STL. - (admin)

It’s not just cellphone batteries that drain more quickly in roaming mode.
237 ms