Branch data Line data Source code
1 : : /****************************************************************************** 2 : : * Top contributors (to current version): 3 : : * Andrew Reynolds, Aina Niemetz, Yoni Zohar 4 : : * 5 : : * This file is part of the cvc5 project. 6 : : * 7 : : * Copyright (c) 2009-2024 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. 11 : : * **************************************************************************** 12 : : * 13 : : * The integer AND operator. 14 : : */ 15 : : 16 : : #include "cvc5_public.h" 17 : : 18 : : #ifndef CVC5__IAND_H 19 : : #define CVC5__IAND_H 20 : : 21 : : #include <iosfwd> 22 : : 23 : : #include "base/exception.h" 24 : : #include "util/integer.h" 25 : : 26 : : namespace cvc5::internal { 27 : : 28 : : struct IntAnd 29 : : { 30 : : uint32_t d_size; 31 : 321 : IntAnd(uint32_t size) : d_size(size) {} 32 : 2469 : operator uint32_t() const { return d_size; } 33 : : }; /* struct IntAnd */ 34 : : 35 : : /* ----------------------------------------------------------------------- 36 : : * Output stream 37 : : * ----------------------------------------------------------------------- */ 38 : : 39 : : inline std::ostream& operator<<(std::ostream& os, const IntAnd& ia); 40 : 88 : inline std::ostream& operator<<(std::ostream& os, const IntAnd& ia) 41 : : { 42 : 88 : return os << "(_ iand " << ia.d_size << ")"; 43 : : } 44 : : 45 : : } // namespace cvc5::internal 46 : : 47 : : #endif /* CVC5__IAND_H */