diff --git a/src/dawn/common/StackContainer.h b/src/dawn/common/StackContainer.h index ba3bfae679..9788510c73 100644 --- a/src/dawn/common/StackContainer.h +++ b/src/dawn/common/StackContainer.h @@ -34,8 +34,8 @@ template class StackAllocator : public std::allocator { public: - typedef typename std::allocator::pointer pointer; - typedef typename std::allocator::size_type size_type; + typedef typename std::allocator_traits>::pointer pointer; + typedef typename std::allocator_traits>::size_type size_type; // Backing store for the allocator. The container owner is responsible for // maintaining this for as long as any containers using this allocator are diff --git a/src/dawn/tests/ParamGenerator.h b/src/dawn/tests/ParamGenerator.h index fd06c714d1..4e6a6f3b8a 100644 --- a/src/dawn/tests/ParamGenerator.h +++ b/src/dawn/tests/ParamGenerator.h @@ -53,8 +53,14 @@ class ParamGenerator { } } - class Iterator : public std::iterator { + class Iterator { public: + using iterator_category = std::forward_iterator_tag; + using value_type = ParamStruct; + using difference_type = size_t; + using pointer = ParamStruct*; + using reference = ParamStruct&; + Iterator& operator++() { // Increment the Index by 1. If the i'th place reaches the maximum, // reset it to 0 and continue with the i+1'th place. diff --git a/src/tint/clone_context.h b/src/tint/clone_context.h index b998079670..e027565aa1 100644 --- a/src/tint/clone_context.h +++ b/src/tint/clone_context.h @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -366,7 +367,7 @@ class CloneContext { /// references of the original object. A type mismatch will result in an /// assertion in debug builds, and undefined behavior in release builds. /// @returns this CloneContext so calls can be chained - template > + template > CloneContext& Replace(const WHAT* what, WITH&& with) { TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(Clone, src, what); replacements_[what] = with;