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,935 of 33,346    |
|    =?ISO-8859-1?Q?=D6=F6_Tiib?= to DeMarcus    |
|    Re: Can I overload with unused arguments    |
|    14 Mar 13 07:17:26    |
      From: ootiib@hot.ee              On Thursday, 14 March 2013 13:35:05 UTC+2, DeMarcus wrote:       > On 2013-03-13 17:35, Öö Tiib wrote:       > > On Wednesday, 13 March 2013 00:50:06 UTC+2, DeMarcus wrote:       > > If it is dynamic polymorphism or dynamic dispatch then get out of       > > immersion of nullptr. Make a polymorphic smart pointer that instead       > > of nullptr uses pointer to static "MissingEntertainer" object that       > > *implements* the interface of Entertainer (just does nothing). Such       > > pointer can then never be nullptr, can be always dereferenced etc.       > > I'd call it as robust_pointer. :-)       >       > I agree your solution is better, but you can still accidently provide       > nullptr, right?              Because of new loose semantics of list-initializes I currently seem to       make all constructors besides default, copy and move 'explicit'.              With smart pointers I additionally tend to have factory functions       and prefer those when creating the pointers:               template |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca