diff --git a/src/include/xpr/pos_type.cc.h b/src/include/xpr/pos_type.cc.h index 1abdf25..8ee443e 100644 --- a/src/include/xpr/pos_type.cc.h +++ b/src/include/xpr/pos_type.cc.h @@ -711,13 +711,13 @@ namespace CNORXZ static_assert(((static_pos_size::value == 1) and ...), "only single pos types allowed"); if constexpr(is_epos_type::value){ return iter<0,sizeof...(OPosTs)> - ( [&](auto i) { return std::get(mP)+a.template get(); }, + ( [&](auto i) { return std::get(mP)+a.template oget(); }, [&](const auto&... e) { return epos(BPosT::operator+(a.scal()),e...); } ); } else { auto ax = mkEPos(a,a*SPos<0>{}); return iter<0,sizeof...(OPosTs)> - ( [&](auto i) { return std::get(mP)+ax.template get(); }, + ( [&](auto i) { return std::get(mP)+ax.template oget(); }, [&](const auto&... e) { return epos(BPosT::operator+(a),e...); } ); } } @@ -731,7 +731,7 @@ namespace CNORXZ if constexpr(is_epos_type::value){ return iter<0,sizeof...(OPosTs)> ( [&](auto i) { auto x = scal(); auto y = a.scal(); - auto q = std::get(mP); auto p = a.template get(); + auto q = std::get(mP); auto p = a.template oget(); return x*p+q*(y+p); }, [&](const auto&... e) { return epos(BPosT::operator*(a.scal()),e...); } ); } @@ -739,7 +739,7 @@ namespace CNORXZ auto ax = mkEPos(a,a*SPos<0>{}); return iter<0,sizeof...(OPosTs)> ( [&](auto i) { auto x = scal(); auto y = ax.scal(); - auto q = std::get(mP); auto p = ax.template get(); + auto q = std::get(mP); auto p = ax.template oget(); return x*p+q*(y+p); }, [&](const auto&... e) { return epos(BPosT::operator*(a),e...); } ); } @@ -783,6 +783,13 @@ namespace CNORXZ return scal()+std::get(mP); } + template + template + constexpr decltype(auto) EPos::oget() const + { + return std::get(mP); + } + template template constexpr decltype(auto) EPos::ival(std::index_sequence is) const diff --git a/src/include/xpr/pos_type.h b/src/include/xpr/pos_type.h index ce1eb47..a0a71ad 100644 --- a/src/include/xpr/pos_type.h +++ b/src/include/xpr/pos_type.h @@ -311,6 +311,9 @@ namespace CNORXZ template constexpr decltype(auto) get() const; + + template + constexpr decltype(auto) oget() const; // offset only }; template