aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-04-19 12:40:54 -0700
committerrtk0c <[email protected]>2022-04-19 12:40:54 -0700
commit5f8b091d84bf6be9b2fa2e485e435e8f43e20b85 (patch)
treebc99dce491089cb2c8d64c25a032a5ce6ecf32aa /source
parent3290bb2b2dec223f0312c6d5fc3edf71d5d6e46f (diff)
Changeset: 13 Fix SmallVector.cpp missing include & remove warning on MSVC
Diffstat (limited to 'source')
-rw-r--r--source/SmallVector.cpp1
-rw-r--r--source/SmallVector.hpp9
2 files changed, 10 insertions, 0 deletions
diff --git a/source/SmallVector.cpp b/source/SmallVector.cpp
index ec1be43..c38e8a7 100644
--- a/source/SmallVector.cpp
+++ b/source/SmallVector.cpp
@@ -18,6 +18,7 @@
#include <cstdlib>
#include <stdexcept>
+#include <string>
// Check that no bytes are wasted and everything is well-aligned.
namespace {
diff --git a/source/SmallVector.hpp b/source/SmallVector.hpp
index 96371c2..9461800 100644
--- a/source/SmallVector.hpp
+++ b/source/SmallVector.hpp
@@ -31,6 +31,11 @@
#include <type_traits>
#include <utility>
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable : 4267) // The compiler detected a conversion from size_t to a smaller type.
+#endif
+
template <typename IteratorT>
class iterator_range;
@@ -1313,3 +1318,7 @@ inline void swap(SmallVector<T, N>& LHS, SmallVector<T, N>& RHS) {
}
} // namespace std
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif