CBMC
cpp_static_assert.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: C++ Language Type Checking
4 
5 Author: Daniel Kroening, kroening@cs.cmu.edu
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_CPP_CPP_STATIC_ASSERT_H
13 #define CPROVER_CPP_CPP_STATIC_ASSERT_H
14 
15 #include <util/std_expr.h>
16 
18 {
19 public:
20  cpp_static_assertt(exprt _cond, exprt _description)
21  : binary_exprt(
22  std::move(_cond),
23  ID_cpp_static_assert,
24  std::move(_description),
25  typet())
26  {
27  }
28 
30  {
31  return op0();
32  }
33 
34  const exprt &cond() const
35  {
36  return op0();
37  }
38 
39  const exprt &description() const
40  {
41  return op1();
42  }
43 
45  {
46  return op1();
47  }
48 };
49 
50 #endif // CPROVER_CPP_CPP_STATIC_ASSERT_H
A base class for binary expressions.
Definition: std_expr.h:638
exprt & op1()
Definition: expr.h:136
exprt & op0()
Definition: expr.h:133
const exprt & cond() const
cpp_static_assertt(exprt _cond, exprt _description)
const exprt & description() const
Base class for all expressions.
Definition: expr.h:56
The type of an expression, extends irept.
Definition: type.h:29
API to expression classes.