Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualfrob

Posted 25 November 2012 - 09:05 PM

In Effective C++, they recommended removing having the non-const version call the const version and remove it with a const_cast.  This assumes it is not a virtual function.

If they are virtual, you are best with the duplication, or having both of them call a separate private method that does the actual work.

#1frob

Posted 25 November 2012 - 09:03 PM

In Effective C++, Sutter recommended removing having the non-const version call the const version and remove it with a const_cast.  This assumes it is not a virtual function.

If they are virtual, you are best with the duplication, or having both of them call a separate private method that does the actual work.

PARTNERS