| commit | 055af5b4a05176803daf4391d673eb966174fe62 | [log] [tgz] |
|---|---|---|
| author | Antonio Maiorano <amaiorano@google.com> | Fri Mar 08 12:32:50 2024 +0000 |
| committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Mar 08 12:32:50 2024 +0000 |
| tree | e9daf5e4d4923e2524757c4d35525eb9d1a462ca | |
| parent | d2e17817f13512450d2a7953a165f0fe470d2bed [diff] |
tint: fix compile error on macos wrt operator<<
Building tint_unittests on macos with AppleClang failed with, for example:
error: invalid operands to binary expression ('std::__1::basic_ostream<char>' and 'const tint::core::ir::Usage')
return out << key.Value();
This was caused by hashmap_base.h's operator<< erroneously detecting that the
stream object << rhs was available when using
traits::HasOperatorShiftLeft<STREAM, T>. The problem was that the expression
"std::declval<LHS> << std::declval<RHS>" was being used to test if the
expression is valid; however, std::declval returns an r-value reference, so this
was testing "r-value lhs << r-value rhs", and for stream objects, the lhs needs
to be an l-value (typically accepts const& and &). So we fix this by making it
"std::declval<LHS&>" to ensure it always evaluates to an lvalue.
Change-Id: Id722a87204cf998a21130f17b9d3377c487cb890
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/178264
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h version that Dawn implements.webgpu.h.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.