home bbs files messages ]

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 32,988 of 33,346   
   Francis Glassborow to Jonathan Thornburg   
   Re: want to pass vector to fn expe   
   21 Apr 13 15:47:18   
   
   From: francis.glassborow@btinternet.com   
      
   On 20/04/2013 22:49, Jonathan Thornburg wrote:   
   > Martin Ba <0xcdcdcdcd@gmx.at> wrote:   
      
   > But it's not clear to me that the reason (explained by Cline in the   
   > first of those FAQ entries) *why* it's illegal to implicitly convert   
   > foo** to const foo** should apply to converting std::vector to   
   > std::vector .  That is, I don't see any way in which   
   > allowing this implicit conversion would open a hole in the type   
   > system.  Can anyone clarify this point for me?   
   >   
      
   The problem is actually unrelated to issues with the safety of the type   
   system. The problem is with templates. These create unrelated types. So   
   there is no relationship in so far as the language specification is   
   concerned, between   
   std::vector  and std::vector   
      
   I am at a loss to see how we could specify such a relationship without,   
   at the same time, introducing a great gaping hole in the type system. If   
   anyone here knows better they should write a paper on the subject and   
   (if not able to do it themselves) find someone to sponsor it at WG21.   
      
   Francis   
      
      
   --   
         [ 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