CBMC
base_exceptions.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Util base exceptions
4 
5 Author: Diffblue Ltd.
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_UTIL_BASE_EXCEPTIONS_H
13 #define CPROVER_UTIL_BASE_EXCEPTIONS_H
14 
15 #include "util/invariant.h"
16 
18 {
19 public:
20  // Normally we'd prefer
21  // using invariant_failedt::invariant_failedt;
22  // However, this isn't supported on VS2013.
23 
24  template <typename... Ts>
25  explicit bad_cast_exceptiont(Ts &&...ts):
26  invariant_failedt(std::forward<Ts>(ts)...) {}
27 };
28 
30 {
31 public:
32  template <typename... Ts>
33  explicit nullptr_exceptiont(Ts &&...ts):
34  invariant_failedt(std::forward<Ts>(ts)...) {}
35 };
36 
37 #endif
bad_cast_exceptiont
Definition: base_exceptions.h:17
invariant_failedt
A logic error, augmented with a distinguished field to hold a backtrace.
Definition: invariant.h:109
invariant.h
nullptr_exceptiont
Definition: base_exceptions.h:29
bad_cast_exceptiont::bad_cast_exceptiont
bad_cast_exceptiont(Ts &&...ts)
Definition: base_exceptions.h:25
nullptr_exceptiont::nullptr_exceptiont
nullptr_exceptiont(Ts &&...ts)
Definition: base_exceptions.h:33