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 33,241 of 33,346    |
|    demo to All    |
|    Re: Templated convertion operator    |
|    09 Oct 13 12:31:14    |
      From: Tore.Halvorsen@googlemail.com              On Friday, 4 October 2013 19:23:10 UTC+2, Öö Tiib wrote:       > For simple tests use some online service like: http://ideone.com/              Thank you for that link!              > 'std::string' has number of implicit conversion constructors and       > copy constructor so above code must be is ambiguous. Implicit       > conversion constructors together with implicit conversion operators       > often result with confused compiler (and confused people too).              Ah, yes, I see.              Since foo can be converted into the different types that std::string       takes as parameters to its convertion constructor, there is no clear       path from foo to std::string...                     --        [ 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