File tree 2 files changed +12
-8
lines changed
2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -1697,6 +1697,18 @@ namespace xt
1697
1697
constexpr typename fixed_shape<X...>::cast_type fixed_shape<X...>::m_array;
1698
1698
#endif
1699
1699
1700
+ template <std::size_t ... X1, std::size_t ... X2>
1701
+ XTENSOR_FIXED_SHAPE_CONSTEXPR bool operator ==(const fixed_shape<X1...>& lhs, const fixed_shape<X2...>& rhs)
1702
+ {
1703
+ return std::is_same<fixed_shape<X1...>, fixed_shape<X2...>>::value;
1704
+ }
1705
+
1706
+ template <std::size_t ... X1, std::size_t ... X2>
1707
+ XTENSOR_FIXED_SHAPE_CONSTEXPR bool operator !=(const fixed_shape<X1...>& lhs, const fixed_shape<X2...>& rhs)
1708
+ {
1709
+ return !(lhs == rhs);
1710
+ }
1711
+
1700
1712
#undef XTENSOR_FIXED_SHAPE_CONSTEXPR
1701
1713
1702
1714
template <class E , std::ptrdiff_t Start, std::ptrdiff_t End = -1 >
Original file line number Diff line number Diff line change @@ -939,14 +939,6 @@ namespace xt
939
939
EXPECT_EQ (b.dimension (), 0u );
940
940
EXPECT_EQ (minmax (b)(), (A{1.2 , 1.2 }));
941
941
}
942
-
943
- template <std::size_t ... I, std::size_t ... J>
944
- bool operator ==(fixed_shape<I...>, fixed_shape<J...>)
945
- {
946
- std::array<std::size_t , sizeof ...(I)> ix = {I...};
947
- std::array<std::size_t , sizeof ...(J)> jx = {J...};
948
- return sizeof ...(J) == sizeof ...(I) && std::equal (ix.begin (), ix.end (), jx.begin ());
949
- }
950
942
951
943
TEST (xreducer, keep_dims)
952
944
{
You can’t perform that action at this time.
0 commit comments