Angelika Langer - Training & Consulting
HOME | COURSES | TALKS | ARTICLES | GENERICS | LAMBDAS | IOSTREAMS | ABOUT | CONTACT | Twitter | Lanyrd | Linkedin
HOME 


  UPCOMING
  PREVIOUS
  MATERIALS
 
GENERICS 
LAMBDAS 
IOSTREAMS 
ABOUT 
CONTACT 
Implementing Binary Operators in C++ - Tutorial

Implementing Binary Operators in C++ - Tutorial  
ABSTRACT
 
In principle, implementing binary operators such as operator= and operator== is fairly easy for simple types, but is amazingly demanding for a class hierarchy of types. In this tutorial we will look into the complexities and will discuss solutions. The core of the problem stems from the fact, that objects in a class hierarchy have something in common, namely their base class part.  For this reason, it makes sense to consider mixed-type operations where objects of different types from the same class hierarchy are assigned to each other or compared to each other.  Does it make sense to allow mixed-type operations, and if so, how can they be implemented correctly? 
 
PREREQUISITES

 
Level: introductory / intermediate
Duration: 1.5 hours
Prerequisites: Attendants should be familiar with C++. Expert knowledge of C++ is not required.
Presented at: ACCU 2004 , Oxford, UK, April 2004

 
 

If you are interested to hear more about this and related topics you might want to check out the following seminar or skim through some further reading:
Seminars
 
Reliable C++
3 day seminar (open enrollment and on-site)
 
Slides
 
ACCU 2004 , Oxford, UK, April 2004
  © Copyright 1995-2005 by Angelika Langer.  All Rights Reserved.    URL: < http://www.AngelikaLanger.com/Conferences/Abstracts/CppBinaryOperators.htm  last update: 6 Nov 2005