[Bf-blender-cvs] [2e8089b6bf5] blender-v3.2-release: Workaround for msvc compiler bug

Jacques Lucke noreply at git.blender.org
Thu May 12 13:38:32 CEST 2022


Commit: 2e8089b6bf50f50bd552d10962a877884c552a22
Author: Jacques Lucke
Date:   Thu May 12 13:38:22 2022 +0200
Branches: blender-v3.2-release
https://developer.blender.org/rB2e8089b6bf50f50bd552d10962a877884c552a22

Workaround for msvc compiler bug

https://developercommunity.visualstudio.com/t/Alias-template-inside-fold-expression-fa/10040507

===================================================================

M	source/blender/functions/FN_multi_function_builder.hh

===================================================================

diff --git a/source/blender/functions/FN_multi_function_builder.hh b/source/blender/functions/FN_multi_function_builder.hh
index dc91c9ee47c..e6dc01eb539 100644
--- a/source/blender/functions/FN_multi_function_builder.hh
+++ b/source/blender/functions/FN_multi_function_builder.hh
@@ -207,8 +207,8 @@ void execute_materialized(TypeSequence<ParamTags...> /* param_tags */,
   (
       /* Setup information for all parameters. */
       [&] {
-        using ParamTag = ParamTags;
-        using T = typename ParamTag::base_type;
+        typedef ParamTags ParamTag;
+        typedef typename ParamTag::base_type T;
         [[maybe_unused]] ArgInfo<ParamTags> &arg_info = std::get<I>(args_info);
         if constexpr (ParamTag::category == MFParamCategory::SingleInput) {
           VArray<T> &varray = *args;
@@ -282,8 +282,8 @@ void execute_materialized(TypeSequence<ParamTags...> /* param_tags */,
     (
         /* Destruct values that have been materialized before. */
         [&] {
-          using ParamTag = ParamTags;
-          using T = typename ParamTag::base_type;
+          typedef ParamTags ParamTag;
+          typedef typename ParamTag::base_type T;
           [[maybe_unused]] ArgInfo<ParamTags> &arg_info = std::get<I>(args_info);
           if constexpr (ParamTag::category == MFParamCategory::SingleInput) {
             if (arg_info.mode == ArgMode::Materialized) {
@@ -298,8 +298,8 @@ void execute_materialized(TypeSequence<ParamTags...> /* param_tags */,
   (
       /* Destruct buffers for single value inputs. */
       [&] {
-        using ParamTag = ParamTags;
-        using T = typename ParamTag::base_type;
+        typedef ParamTags ParamTag;
+        typedef typename ParamTag::base_type T;
         [[maybe_unused]] ArgInfo<ParamTags> &arg_info = std::get<I>(args_info);
         if constexpr (ParamTag::category == MFParamCategory::SingleInput) {
           if (arg_info.mode == ArgMode::Single) {
@@ -347,8 +347,8 @@ template<typename... ParamTags> class CustomMF : public MultiFunction {
     (
         /* Get all parameters from #params and store them in #retrieved_params. */
         [&]() {
-          using ParamTag = typename TagsSequence::template at_index<I>;
-          using T = typename ParamTag::base_type;
+          typedef typename TagsSequence::template at_index<I> ParamTag;
+          typedef typename ParamTag::base_type T;
 
           if constexpr (ParamTag::category == MFParamCategory::SingleInput) {
             std::get<I>(retrieved_params) = params.readonly_single_input<T>(I);
@@ -402,7 +402,7 @@ template<typename... ParamTags> class CustomMF : public MultiFunction {
     (
         /* Loop over all parameter types and add an entry for each in the signature. */
         [&] {
-          using ParamTag = typename TagsSequence::template at_index<I>;
+          typedef typename TagsSequence::template at_index<I> ParamTag;
           signature.add(ParamTag(), "");
         }(),
         ...);



More information about the Bf-blender-cvs mailing list