2121#include < functional>
2222#include < utility>
2323#include < vector>
24- #ifdef X_OLD_CLANG
25- #include < initializer_list>
26- #endif
2724
2825#include < xtl/xclosure.hpp>
2926#include < xtl/xsequence.hpp>
@@ -51,19 +48,11 @@ namespace xt
5148 return broadcast (T (1 ), std::forward<S>(shape));
5249 }
5350
54- #ifdef X_OLD_CLANG
55- template <class T , class I >
56- inline auto ones (std::initializer_list<I> shape) noexcept
57- {
58- return broadcast (T (1 ), shape);
59- }
60- #else
6151 template <class T , class I , std::size_t L>
6252 inline auto ones (const I (&shape)[L]) noexcept
6353 {
6454 return broadcast (T (1 ), shape);
6555 }
66- #endif
6756
6857 /* ********
6958 * zeros *
@@ -79,19 +68,11 @@ namespace xt
7968 return broadcast (T (0 ), std::forward<S>(shape));
8069 }
8170
82- #ifdef X_OLD_CLANG
83- template <class T , class I >
84- inline auto zeros (std::initializer_list<I> shape) noexcept
85- {
86- return broadcast (T (0 ), shape);
87- }
88- #else
8971 template <class T , class I , std::size_t L>
9072 inline auto zeros (const I (&shape)[L]) noexcept
9173 {
9274 return broadcast (T (0 ), shape);
9375 }
94- #endif
9576
9677 /* *
9778 * Create a xcontainer (xarray, xtensor or xtensor_fixed) with uninitialized values of
@@ -117,20 +98,12 @@ namespace xt
11798 return xtensor<T, N, L>(xtl::forward_sequence<shape_type, decltype (shape)>(shape));
11899 }
119100
120- #ifndef X_OLD_CLANG
121101 template <class T , layout_type L = XTENSOR_DEFAULT_LAYOUT, class I , std::size_t N>
122102 inline xtensor<T, N, L> empty (const I (&shape)[N])
123103 {
124104 using shape_type = typename xtensor<T, N>::shape_type;
125105 return xtensor<T, N, L>(xtl::forward_sequence<shape_type, decltype (shape)>(shape));
126106 }
127- #else
128- template <class T , layout_type L = XTENSOR_DEFAULT_LAYOUT, class I >
129- inline xarray<T, L> empty (const std::initializer_list<I>& init)
130- {
131- return xarray<T, L>::from_shape (init);
132- }
133- #endif
134107
135108 template <class T , layout_type L = XTENSOR_DEFAULT_LAYOUT, std::size_t ... N>
136109 inline xtensor_fixed<T, fixed_shape<N...>, L> empty (const fixed_shape<N...>& /* shape*/ )
@@ -900,7 +873,7 @@ namespace xt
900873 template <std::size_t ... I, class ... E>
901874 inline auto meshgrid_impl (std::index_sequence<I...>, E&&... e) noexcept
902875 {
903- #if defined X_OLD_CLANG || defined _MSC_VER
876+ #if defined _MSC_VER
904877 const std::array<std::size_t , sizeof ...(E)> shape = {e.shape ()[0 ]...};
905878 return std::make_tuple (
906879 detail::make_xgenerator (
0 commit comments