From 089015b25076865faa67e28fb183ccd5e6554079 Mon Sep 17 00:00:00 2001 From: Jakob Rath Date: Fri, 21 May 2021 22:50:01 +0200 Subject: [PATCH] Minor fix in sat::literal (#5293) --- src/util/sat_literal.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/sat_literal.h b/src/util/sat_literal.h index f8be2eb3f..1e587644e 100644 --- a/src/util/sat_literal.h +++ b/src/util/sat_literal.h @@ -17,6 +17,7 @@ Author: #pragma once #include "util/lbool.h" +#include "util/approx_set.h" #include "util/vector.h" #include "util/uint_set.h" @@ -93,6 +94,8 @@ namespace sat { inline bool operator==(literal const & l1, literal const & l2) { return l1.m_val == l2.m_val; } inline bool operator!=(literal const & l1, literal const & l2) { return l1.m_val != l2.m_val; } + inline std::ostream & operator<<(std::ostream & out, sat::literal l) { if (l == sat::null_literal) out << "null"; else out << (l.sign() ? "-" : "") << l.var(); return out; } + typedef svector literal_vector; typedef std::pair literal_pair; @@ -160,7 +163,7 @@ namespace sat { struct dimacs_lit { literal m_lit; - dimacs_lit(literal l):m_lit(l) {} + explicit dimacs_lit(literal l):m_lit(l) {} }; inline std::ostream & operator<<(std::ostream & out, dimacs_lit const & dl) { @@ -189,6 +192,3 @@ namespace sat { } }; - -inline std::ostream & operator<<(std::ostream & out, sat::literal l) { if (l == sat::null_literal) out << "null"; else out << (l.sign() ? "-" : "") << l.var(); return out; } -