Commit 5d2a4d4c by Ben Clayton

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/+/40209Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent b3805904
...@@ -60,7 +60,7 @@ struct alignas(sizeof(T) * N) vec ...@@ -60,7 +60,7 @@ struct alignas(sizeof(T) * N) vec
{ {
vec() = default; vec() = default;
explicit vec(T replicate) constexpr explicit vec(T replicate)
{ {
for(int i = 0; i < N; i++) for(int i = 0; i < N; i++)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment