Skip to content

Commit 8cc2fc3

Browse files
committed
Several include fixes
1 parent 4aeb84e commit 8cc2fc3

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

include/Lz/detail/iterators/range.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
#include <Lz/detail/iterator.hpp>
88
#include <Lz/detail/procs.hpp>
99
#include <Lz/detail/traits.hpp>
10-
#include <cmath>
1110
#include <limits>
1211

1312
namespace lz {
1413
namespace detail {
1514

1615
template<class Floating>
1716
constexpr bool almost_equal(const Floating a, const Floating b, const Floating epsilon = static_cast<Floating>(1e-6)) {
18-
return std::fabs(a - b) < epsilon;
17+
const auto abs_a = a - b;
18+
return (abs_a < 0 ? -abs_a : abs_a) < epsilon;
1919
}
2020

2121
template<class Arithmetic, bool /* step wise */>

include/Lz/stream.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <Lz/detail/adaptors/fn_args_holder.hpp>
88
#include <Lz/detail/compiler_checks.hpp>
99
#include <Lz/detail/traits.hpp>
10+
#include <ostream>
1011
#include <string>
1112

1213
#if !defined(LZ_STANDALONE)
@@ -17,11 +18,6 @@
1718
#elif defined(LZ_HAS_FORMAT)
1819

1920
#include <format>
20-
#include <sstream>
21-
22-
#else
23-
24-
#include <sstream>
2521

2622
#endif // !defined(LZ_STANDALONE)
2723

src/lz.cppm

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
module;
22

33
#include <algorithm>
4-
#include <array>
5-
#include <cmath>
6-
#include <concepts>
7-
#include <cstdint>
84
#include <format>
9-
#include <functional>
105
#include <iterator>
116
#include <limits>
127
#include <numeric>
138
#include <optional>
9+
#include <ostream>
1410
#include <random>
1511
#include <regex>
16-
#include <sstream>
1712
#include <string_view>
1813
#include <tuple>
1914
#include <type_traits>
@@ -65,6 +60,7 @@ export module lz;
6560
#include "Lz/loop.hpp"
6661
#include "Lz/map.hpp"
6762
#include "Lz/optional.hpp"
63+
#include "Lz/pairwise.hpp"
6864
#include "Lz/random.hpp"
6965
#include "Lz/range.hpp"
7066
#include "Lz/regex_split.hpp"

0 commit comments

Comments
 (0)