mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 09:25:25 +00:00
Fixes for C++20 support.
Various things are deprecated or removed in C++20, including * Various allocator member types * std::iterator * std::result_of Replace these with supported versions. Bug: chromium:1284275 Change-Id: I11a2909e3a269cdb98ada2bd6621086409878242 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89040 Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Auto-Submit: Peter Kasting <pkasting@google.com> Commit-Queue: Peter Kasting <pkasting@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
7cbd8202e6
commit
d3921b8230
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <type_traits>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
@@ -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 <typename WHAT, typename WITH, typename = std::result_of_t<WITH()>>
|
||||
template <typename WHAT, typename WITH, typename = std::invoke_result_t<WITH>>
|
||||
CloneContext& Replace(const WHAT* what, WITH&& with) {
|
||||
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(Clone, src, what);
|
||||
replacements_[what] = with;
|
||||
|
||||
Reference in New Issue
Block a user