Use of a function object.

Supporting Design by Contract in C++
by David Maley and Ivor Spence
Listing 5. Use of a function object.


Complex Complex::operator/(const double& d)
{
  OperatorDivide dbc(this, &Complex::operatorDivide_body);
  return dbc(d);
}

About the Authors

David Maley is with St. Mary's University College, Belfast. He can be contacted at d.maley@stmarys-belfast.ac.uk.

Ivor Spence is with Queen's University of Belfast. He can be contacted at i.spence@qub.ac.uk.

Featured

Most   Popular
Upcoming Events

AppTrends

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.