blob: 79bc5d41f4107c96f4397a8c532d9847da8d5294 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
diff --git a/src/include/buffer.h b/src/include/buffer.h
index 7c8f90e9fb5d3..71cb01935000b 100644
--- a/src/include/buffer.h
+++ b/src/include/buffer.h
@@ -41,6 +41,7 @@
#include <iosfwd>
#include <iomanip>
#include <list>
+#include <memory>
#include <vector>
#include <string>
#if __cplusplus >= 201703L
diff --git a/src/rgw/rgw_string.h b/src/rgw/rgw_string.h
index 257daa9c1fe6e..90e64f98a2587 100644
--- a/src/rgw/rgw_string.h
+++ b/src/rgw/rgw_string.h
@@ -8,6 +8,8 @@
#include <stdlib.h>
#include <limits.h>
#include <string_view>
+#include <string>
+#include <stdexcept>
#include <boost/container/small_vector.hpp>
diff --git a/src/test/encoding.cc b/src/test/encoding.cc
index 6d252fae18b71..f18901cbd27d9 100644
--- a/src/test/encoding.cc
+++ b/src/test/encoding.cc
@@ -334,11 +334,11 @@ void lame_decoder(int which) {
}
TEST(EncodingException, Macros) {
- for (unsigned i = 0; i < sizeof(expected_what)/sizeof(expected_what[0]); i++) {
+ for (unsigned i = 0; i < std::size(expected_what); i++) {
try {
lame_decoder(i);
} catch (const exception& e) {
- ASSERT_EQ(string(expected_what[i]), string(e.what()));
+ ASSERT_NE(string(e.what()).find(expected_what[i]), string::npos);
}
}
}
|