Link Details

Link 1095875 thumbnail
User 225256 avatar

By mswatcher
via geekswithblogs.net
Submitted: Jan 14 2014 / 13:44

There has been a lot of talk about design patterns, but not so much about code patterns, also referred to as idioms. A code pattern describes typical general code for common operations. This article focuses on operator patterns in C++. Not all classes need their own operators, but small classes which often represents some kind of value, will very often need a set of operators. Further, classes that use dynamic memory (heap allocation) must implement a copy constructor and an assignment operator (in addition to a destructor) if they are going to be copy able. (ref. The Big Three Law (B3L(see C++ FAQ).
  • 2
  • 0
  • 45
  • 28

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (2)



Voters Against This Link (0)



    Java EE7
    Written by: Andrew Lee Rubinger
    Featured Refcardz: Top Refcardz:
    1. Design Patterns
    2. OO JS
    3. Cont. Delivery
    4. CI Patterns
    5. CI Tools
    1. Spring Integration
    2. Git
    3. Regex
    4. Java
    5. REST