commit | 5d2a4d4c14d0e08ae1d2afbbec0a8c21a8aa9401 | [log] [tgz] |
---|---|---|
author | Ben Clayton <bclayton@google.com> | Tue Jan 14 17:10:58 2020 +0000 |
committer | Ben Clayton <bclayton@google.com> | Wed Jan 15 12:16:38 2020 +0000 |
tree | f298738fc8223d640ce9c81bae163f9235ea8b04 | |
parent | b3805904ab0a1401d7db423eea9b09365d4c069b [diff] |
System/Types.hpp: Make vec(T replicate) constexpr The generic template constructor now matches the `vec<T, 4>` specialization in terms of `constexpr`. This is only achievable with the relaxed rules on `constexpr` in C++14. Bug: b/147359661 Change-Id: I1c63ddd1fbdf3c491f8fcdba96047be0665f122f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/40209 Reviewed-by: Nicolas Capens <nicolascapens@google.com> Tested-by: Ben Clayton <bclayton@google.com>
diff --git a/src/System/Types.hpp b/src/System/Types.hpp index d99205b..165df56 100644 --- a/src/System/Types.hpp +++ b/src/System/Types.hpp
@@ -60,7 +60,7 @@ { vec() = default; - explicit vec(T replicate) + constexpr explicit vec(T replicate) { for(int i = 0; i < N; i++) {