File tree Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -456,16 +456,21 @@ namespace xt
456456        constexpr  bool  simd_strided_assign = traits::simd_strided_assign ();
457457        if  (linear_assign)
458458        {
459-             if  (simd_linear_assign || traits::simd_linear_assign (de1, de2))
460-             {
461-                 //  Do not use linear_assigner<true> here since it will make the compiler
462-                 //  instantiate this branch even if the runtime condition is false, resulting
463-                 //  in compilation error for expressions that do not provide a SIMD interface.
464-                 //  simd_assign is true if simd_linear_assign() or simd_linear_assign(de1, de2)
465-                 //  is true.
466-                 linear_assigner<simd_assign>::run (de1, de2);
467-             }
468-             else 
459+             //  Do not use linear_assigner<true> here since it will make the compiler
460+             //  instantiate this branch even if the runtime condition is false, resulting
461+             //  in compilation error for expressions that do not provide a SIMD interface.
462+             //  simd_assign is true if simd_linear_assign() or simd_linear_assign(de1, de2)
463+             //  is true.
464+             if  constexpr (simd_assign) {
465+                 if (simd_linear_assign || traits::simd_linear_assign (de1, de2))
466+                 {
467+                     linear_assigner<true >::run (de1, de2);
468+                 }
469+                 else 
470+                 {
471+                     linear_assigner<false >::run (de1, de2);
472+                 }
473+             } else 
469474            {
470475                linear_assigner<false >::run (de1, de2);
471476            }
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ namespace xt
153153                (L == layout_type::row_major) || (L == layout_type::column_major),
154154                " Layout not supported for fixed array" 
155155            );
156- #if  (_MSC_VER >= 1910)
156+ #if  (defined(_MSC_VER_) &&  _MSC_VER >= 1910)
157157            using  temp_type = std::index_sequence<X...>;
158158            return  R ({workaround::get_computed_strides<L, I, temp_type>(shape[I] == 1 )...});
159159#else 
Original file line number Diff line number Diff line change @@ -1242,7 +1242,6 @@ namespace xt
12421242    template  <layout_type L = XTENSOR_DEFAULT_TRAVERSAL, class  E >
12431243    inline  auto  argmin (const  xexpression<E>& e)
12441244    {
1245-         using  value_type = typename  E::value_type;
12461245        auto && ed = eval (e.derived_cast ());
12471246        auto  begin = ed.template  begin <L>();
12481247        auto  end = ed.template  end <L>();
@@ -1272,7 +1271,6 @@ namespace xt
12721271    template  <layout_type L = XTENSOR_DEFAULT_TRAVERSAL, class  E >
12731272    inline  auto  argmax (const  xexpression<E>& e)
12741273    {
1275-         using  value_type = typename  E::value_type;
12761274        auto && ed = eval (e.derived_cast ());
12771275        auto  begin = ed.template  begin <L>();
12781276        auto  end = ed.template  end <L>();
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments