Skip to content

Commit 956e95f

Browse files
author
Mykola Vankovych
committed
removing std namespace opening.
1 parent 351378a commit 956e95f

File tree

2 files changed

+26
-32
lines changed

2 files changed

+26
-32
lines changed

include/xtensor/xfixed.hpp

+9-12
Original file line numberDiff line numberDiff line change
@@ -959,20 +959,17 @@ namespace xt
959959
# pragma clang diagnostic ignored "-Wmismatched-tags"
960960
#endif
961961

962-
namespace std
962+
template <class ET, class S, xt::layout_type L, bool SH, class Tag>
963+
class std::tuple_size<xt::xfixed_container<ET, S, L, SH, Tag>> :
964+
public std::integral_constant<std::size_t, xt::detail::fixed_compute_size<S>::value>
963965
{
964-
template <class ET, class S, xt::layout_type L, bool SH, class Tag>
965-
class tuple_size<xt::xfixed_container<ET, S, L, SH, Tag>> :
966-
public integral_constant<std::size_t, xt::detail::fixed_compute_size<S>::value>
967-
{
968-
};
966+
};
969967

970-
template <class ET, class S, xt::layout_type L, bool SH, class Tag>
971-
class tuple_size<xt::xfixed_adaptor<ET, S, L, SH, Tag>> :
972-
public integral_constant<std::size_t, xt::detail::fixed_compute_size<S>::value>
973-
{
974-
};
975-
}
968+
template <class ET, class S, xt::layout_type L, bool SH, class Tag>
969+
class std::tuple_size<xt::xfixed_adaptor<ET, S, L, SH, Tag>> :
970+
public std::integral_constant<std::size_t, xt::detail::fixed_compute_size<S>::value>
971+
{
972+
};
976973

977974
#if defined(__clang__)
978975
# pragma clang diagnostic pop

include/xtensor/xstorage.hpp

+17-20
Original file line numberDiff line numberDiff line change
@@ -1909,30 +1909,27 @@ namespace xt
19091909
# pragma clang diagnostic ignored "-Wmismatched-tags"
19101910
#endif
19111911

1912-
namespace std
1912+
template <class T, std::size_t N>
1913+
class std::tuple_size<xt::const_array<T, N>> :
1914+
public std::integral_constant<std::size_t, N>
19131915
{
1914-
template <class T, std::size_t N>
1915-
class tuple_size<xt::const_array<T, N>> :
1916-
public integral_constant<std::size_t, N>
1917-
{
1918-
};
1916+
};
19191917

1920-
template <std::size_t... N>
1921-
class tuple_size<xt::fixed_shape<N...>> :
1922-
public integral_constant<std::size_t, sizeof...(N)>
1923-
{
1924-
};
1918+
template <std::size_t... N>
1919+
class std::tuple_size<xt::fixed_shape<N...>> :
1920+
public std::integral_constant<std::size_t, sizeof...(N)>
1921+
{
1922+
};
19251923

1926-
template <class T, std::ptrdiff_t Start, std::ptrdiff_t End>
1927-
class tuple_size<xt::sequence_view<T, Start, End>> :
1928-
public integral_constant<std::size_t, std::size_t(End - Start)>
1929-
{
1930-
};
1924+
template <class T, std::ptrdiff_t Start, std::ptrdiff_t End>
1925+
class std::tuple_size<xt::sequence_view<T, Start, End>> :
1926+
public std::integral_constant<std::size_t, std::size_t(End - Start)>
1927+
{
1928+
};
19311929

1932-
// Undefine tuple size for not-known sequence view size
1933-
template <class T, std::ptrdiff_t Start>
1934-
class tuple_size<xt::sequence_view<T, Start, -1>>;
1935-
}
1930+
// Undefine tuple size for not-known sequence view size
1931+
template <class T, std::ptrdiff_t Start>
1932+
class std::tuple_size<xt::sequence_view<T, Start, -1>>;
19361933

19371934
#if defined(__clang__)
19381935
# pragma clang diagnostic pop

0 commit comments

Comments
 (0)