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 "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(Ts &&...ts)
A logic error, augmented with a distinguished field to hold a backtrace.
Definition: c_errors.h:28
nullptr_exceptiont(Ts &&...ts)