Skip to content

Commit

Permalink
add includes
Browse files Browse the repository at this point in the history
  • Loading branch information
rkaminsk committed Sep 12, 2024
1 parent 1325a72 commit 98659c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions libclingo-lpx/src/number_flint.hh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

#include <ios>
#include <iostream>
#include <limits>
#include <memory>
#include <new>
#include <optional>
#include <stdexcept>
#include <string>

Expand Down
4 changes: 3 additions & 1 deletion libclingo-lpx/src/number_imath.hh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

#include <ios>
#include <iostream>
#include <limits>
#include <memory>
#include <new>
#include <optional>
#include <stdexcept>
#include <string>

Expand Down Expand Up @@ -253,7 +255,7 @@ inline auto Integer::neg() -> Integer & {
}

inline auto Integer::as_int() const -> std::optional<int> {
mp_small = res;
auto res = mp_small{};
if (mp_int_to_int(&num_, &res) == MP_OK) {
if (std::numeric_limits<int>::min() <= res && res <= std::numeric_limits<int>::max()) {
return res;
Expand Down
2 changes: 1 addition & 1 deletion libclingo-lpx/src/parsing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

#include <algorithm>
#include <iterator>
#include <map>
#include <optional>
#include <regex>
#include <stdexcept>
#include <unordered_map>
#include <variant>

namespace {

Expand Down

0 comments on commit 98659c6

Please sign in to comment.