Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 31,434 of 33,346    |
|    Francis Glassborow to Javier    |
|    Re: Covariant return types and interdepe    |
|    31 Aug 11 14:47:54    |
      0b60190a       From: francis.glassborow@btinternet.com              On 31/08/2011 13:52, Javier wrote:       > I'm having a problem trying to get two classes that refer to each       > other take a covariant return type. While this is occurring in the       > Visual C++ 2010 compiler (and I'm posting a modified version here of       > my original post in the C++ forums at MS), I have a more general       > question, namely if there is a way for a compiler to pass what would       > be, in my opinion, valid code for covariant return types, or if I'm at       > the mercy of the compiler vendor :-)              Instead of outlining a wildly complicated piece of code could you please       explain what problem you are trying to solve because IME complex solutions are       usually unnecessary and doubly so if they will not compile.              The other issue in that where two classes are so intimately related it makes       sense to declare and define them in the same header file. Neither of your base       classes can be defined in ignorance of the other so placing them in separate       header files makes no        sense.                     --        [ See http://www.gotw.ca/resources/clcm.htm for info about ]        [ comp.lang.c++.moderated. First time posters: Do this! ]              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca