GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/util/iand.h Lines: 2 4 50.0 %
Date: 2021-03-22 Branches: 0 0 0.0 %

Line Exec Source
1
/*********************                                                        */
2
/*! \file iand.h
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Andrew Reynolds
6
 ** This file is part of the CVC4 project.
7
 ** Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8
 ** in the top-level source directory and their institutional affiliations.
9
 ** All rights reserved.  See the file COPYING in the top-level source
10
 ** directory for licensing information.\endverbatim
11
 **
12
 ** \brief The integer AND operator.
13
 **/
14
15
#include "cvc4_public.h"
16
17
#ifndef CVC4__IAND_H
18
#define CVC4__IAND_H
19
20
#include <iosfwd>
21
22
#include "base/exception.h"
23
#include "util/integer.h"
24
25
namespace CVC4 {
26
27
struct IntAnd
28
{
29
  unsigned d_size;
30
73
  IntAnd(unsigned size) : d_size(size) {}
31
657
  operator unsigned() const { return d_size; }
32
}; /* struct IntAnd */
33
34
/* -----------------------------------------------------------------------
35
 ** Output stream
36
 * ----------------------------------------------------------------------- */
37
38
inline std::ostream& operator<<(std::ostream& os, const IntAnd& ia);
39
inline std::ostream& operator<<(std::ostream& os, const IntAnd& ia)
40
{
41
  return os << "[" << ia.d_size << "]";
42
}
43
44
}  // namespace CVC4
45
46
#endif /* CVC4__IAND_H */