commit 6d4788e04c2f309014acdefc6d7c13db198a1bb9
parent ba2a7744a8f214132e884fbe0dcb1b1ae1982409
Author: d.levin256@gmail.com <d.levin256@gmail.com>
Date: Wed, 11 Oct 2023 17:25:42 +0100
Workaround for MSVC2019 Internal compiler error
Diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/kfr/base/impl/static_array.hpp b/include/kfr/base/impl/static_array.hpp
@@ -100,9 +100,15 @@ struct static_array_base<T, csizes_t<indices...>>
constexpr static_array_base& operator=(const static_array_base&) = default;
constexpr static_array_base& operator=(static_array_base&&) = default;
+ template <size_t index>
+ constexpr static value_type just_value(value_type value) {
+ // Workaround for MSVC2019 Internal compiler error
+ return value;
+ }
+
template <int dummy = 0, CMT_ENABLE_IF(dummy == 0 && static_size > 1)>
KFR_MEM_INTRINSIC constexpr explicit static_array_base(value_type value) noexcept
- : array{ (static_cast<void>(indices), value)... }
+ : array{ just_value<indices>(value)... }
{
}