@@ -478,6 +478,7 @@ namespace xt
478478 void step_leading ();
479479
480480 private:
481+
481482 const xfunction_type* p_f;
482483 std::tuple<typename std::decay_t <CT>::const_stepper...> m_st;
483484 };
@@ -565,9 +566,13 @@ namespace xt
565566 template <class F , class ... CT>
566567 inline layout_type xfunction<F, CT...>::layout() const noexcept
567568 {
568- return std::apply ([&](auto &... e){
569- return compute_layout (e.layout ()...);
570- }, m_e);
569+ return std::apply (
570+ [&](auto &... e)
571+ {
572+ return compute_layout (e.layout ()...);
573+ },
574+ m_e
575+ );
571576 }
572577
573578 template <class F , class ... CT>
@@ -603,12 +608,15 @@ namespace xt
603608 // The static cast prevents the compiler from instantiating the template methods with signed integers,
604609 // leading to warning about signed/unsigned conversions in the deeper layers of the access methods
605610
606- return std::apply ([&](auto &... e){
607- XTENSOR_TRY (check_index (shape (), args...));
608- XTENSOR_CHECK_DIMENSION (shape (), args...);
609- return m_f (e (args...)...);
610-
611- }, m_e);
611+ return std::apply (
612+ [&](auto &... e)
613+ {
614+ XTENSOR_TRY (check_index (shape (), args...));
615+ XTENSOR_CHECK_DIMENSION (shape (), args...);
616+ return m_f (e (args...)...);
617+ },
618+ m_e
619+ );
612620 }
613621
614622 /* *
@@ -623,9 +631,13 @@ namespace xt
623631 template <class F , class ... CT>
624632 inline auto xfunction<F, CT...>::flat(size_type index) const -> const_reference
625633 {
626- return std::apply ([&](auto &... e){
627- return m_f (e.data_element (index)...);
628- }, m_e);
634+ return std::apply (
635+ [&](auto &... e)
636+ {
637+ return m_f (e.data_element (index)...);
638+ },
639+ m_e
640+ );
629641 }
630642
631643 /* *
@@ -653,9 +665,13 @@ namespace xt
653665 {
654666 // The static cast prevents the compiler from instantiating the template methods with signed integers,
655667 // leading to warning about signed/unsigned conversions in the deeper layers of the access methods
656- return std::apply ([&](const auto &... e){
657- return m_f (e.unchecked (static_cast <size_type>(args)...)...);
658- }, m_e);
668+ return std::apply (
669+ [&](const auto &... e)
670+ {
671+ return m_f (e.unchecked (static_cast <size_type>(args)...)...);
672+ },
673+ m_e
674+ );
659675 }
660676
661677 /* *
@@ -669,10 +685,14 @@ namespace xt
669685 template <class It >
670686 inline auto xfunction<F, CT...>::element(It first, It last) const -> const_reference
671687 {
672- return std::apply ([&](auto &... e){
673- XTENSOR_TRY (check_element_index (shape (), first, last));
674- return m_f (e.element (first, last)...);
675- }, m_e);
688+ return std::apply (
689+ [&](auto &... e)
690+ {
691+ XTENSOR_TRY (check_element_index (shape (), first, last));
692+ return m_f (e.element (first, last)...);
693+ },
694+ m_e
695+ );
676696 }
677697
678698 // @}
@@ -806,9 +826,13 @@ namespace xt
806826 template <class F , class ... CT>
807827 inline auto xfunction<F, CT...>::data_element(size_type i) const -> const_reference
808828 {
809- return std::apply ([&](auto &... e){
810- return m_f (e.data_element (i)...);
811- }, m_e);
829+ return std::apply (
830+ [&](auto &... e)
831+ {
832+ return m_f (e.data_element (i)...);
833+ },
834+ m_e
835+ );
812836 }
813837
814838 template <class F , class ... CT>
@@ -822,9 +846,13 @@ namespace xt
822846 template <class align , class requested_type , std::size_t N>
823847 inline auto xfunction<F, CT...>::load_simd(size_type i) const -> simd_return_type<requested_type>
824848 {
825- return std::apply ([&](auto &... e){
826- return m_f.simd_apply ((e.template load_simd <align, requested_type>(i))...);
827- },m_e);
849+ return std::apply (
850+ [&](auto &... e)
851+ {
852+ return m_f.simd_apply ((e.template load_simd <align, requested_type>(i))...);
853+ },
854+ m_e
855+ );
828856 }
829857
830858 template <class F , class ... CT>
@@ -929,9 +957,13 @@ namespace xt
929957 template <class F , class ... CT>
930958 inline auto xfunction_iterator<F, CT...>::operator *() const -> reference
931959 {
932- return std::apply ([&](auto &... it){
933- return (p_f->m_f )(*it...);
934- }, m_it);
960+ return std::apply (
961+ [&](auto &... it)
962+ {
963+ return (p_f->m_f )(*it...);
964+ },
965+ m_it
966+ );
935967 }
936968
937969 template <class F , class ... CT>
@@ -1077,18 +1109,26 @@ namespace xt
10771109 template <class F , class ... CT>
10781110 inline auto xfunction_stepper<F, CT...>::operator *() const -> reference
10791111 {
1080- return std::apply ([&](auto &... e){
1081- return (p_f->m_f )(*e...);
1082- }, m_st);
1112+ return std::apply (
1113+ [&](auto &... e)
1114+ {
1115+ return (p_f->m_f )(*e...);
1116+ },
1117+ m_st
1118+ );
10831119 }
10841120
10851121 template <class F , class ... CT>
10861122 template <class T >
10871123 inline auto xfunction_stepper<F, CT...>::step_simd() -> simd_return_type<T>
10881124 {
1089- return std::apply ([&](auto &... st){
1090- return (p_f->m_f .simd_apply )(st.template step_simd <T>()...);
1091- }, m_st);
1125+ return std::apply (
1126+ [&](auto &... st)
1127+ {
1128+ return (p_f->m_f .simd_apply )(st.template step_simd <T>()...);
1129+ },
1130+ m_st
1131+ );
10921132 }
10931133
10941134 template <class F , class ... CT>
0 commit comments