Skip to main content

Diagnostics

  • Chapter
  • First Online:
  • 3262 Accesses

Abstract

Assertions are Boolean expressions that are expected to be true at a given point in the code. The assert macro of <cassert> is defined similar to this.

This is a preview of subscription content, log in via an institution.

Buying options

eBook
USD   19.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    A mixin is a class that provides some functionality to add to other classes (in this case, the capability of storing a pointer to a nested exception and some related functions). In C++, mixins are generally implemented through multiple inheritance.

  2. 2.

    std::exp() only sets errno for implementations where math_errhandling defined in <cmath> contains MATH_ERRNO: see Chapter 1. This appears to be mostly the case, though.

  3. 3.

    A dynamic exception specification is part of the function declaration and specifies, with a comma-separated list, which exceptions that function is allowed to throw. For example: ReturnType Func(...) throw(exception1, exception2, ...);.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Peter Van Weert and Marc Gregoire

About this chapter

Cite this chapter

Van Weert, P., Gregoire, M. (2016). Diagnostics. In: C++ Standard Library Quick Reference. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1876-1_8

Download citation

Publish with us

Policies and ethics