Skip to content

Commit 8e48331

Browse files
author
Alexandre Hoffmann
committed
should work with clang
1 parent d1210c6 commit 8e48331

File tree

5 files changed

+97
-106
lines changed

5 files changed

+97
-106
lines changed

include/xtensor/containers/xfixed.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ namespace xt
326326
explicit xfixed_container(const inner_shape_type& shape, value_type v, layout_type l = L);
327327

328328
template <class IX = std::integral_constant<std::size_t, N>>
329-
requires(IX::value != 0)
330-
xfixed_container(nested_initializer_list_t<value_type, N> t);
329+
xfixed_container(nested_initializer_list_t<value_type, N> t)
330+
requires(IX::value != 0);
331331

332332
~xfixed_container() = default;
333333

@@ -640,8 +640,8 @@ namespace xt
640640
*/
641641
template <class ET, class S, layout_type L, bool SH, class Tag>
642642
template <class IX>
643-
requires(IX::value != 0)
644643
inline xfixed_container<ET, S, L, SH, Tag>::xfixed_container(nested_initializer_list_t<value_type, N> t)
644+
requires(IX::value != 0)
645645
{
646646
XTENSOR_ASSERT_MSG(
647647
detail::check_initializer_list_shape<N>::run(t, this->shape()) == true,

include/xtensor/containers/xstorage.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -671,17 +671,17 @@ namespace xt
671671
svector(IT begin, IT end, const allocator_type& alloc = allocator_type());
672672

673673
template <std::size_t N2, bool I2>
674-
requires(N != N2)
675-
explicit svector(const svector<T, N2, A, I2>& rhs);
674+
explicit svector(const svector<T, N2, A, I2>& rhs)
675+
requires(N != N2);
676676

677677
svector& operator=(const svector& rhs);
678678
svector& operator=(svector&& rhs) noexcept(std::is_nothrow_move_assignable<value_type>::value);
679679
svector& operator=(const std::vector<T>& rhs);
680680
svector& operator=(std::initializer_list<T> il);
681681

682682
template <std::size_t N2, bool I2>
683-
requires(N != N2)
684-
svector& operator=(const svector<T, N2, A, I2>& rhs);
683+
svector& operator=(const svector<T, N2, A, I2>& rhs)
684+
requires(N != N2);
685685

686686
svector(const svector& other);
687687
svector(svector&& other) noexcept(std::is_nothrow_move_constructible<value_type>::value);
@@ -812,8 +812,8 @@ namespace xt
812812

813813
template <class T, std::size_t N, class A, bool Init>
814814
template <std::size_t N2, bool I2>
815-
requires(N != N2)
816815
inline svector<T, N, A, Init>::svector(const svector<T, N2, A, I2>& rhs)
816+
requires(N != N2)
817817
: m_allocator(rhs.get_allocator())
818818
{
819819
assign(rhs.begin(), rhs.end());
@@ -872,8 +872,8 @@ namespace xt
872872

873873
template <class T, std::size_t N, class A, bool Init>
874874
template <std::size_t N2, bool I2>
875-
requires(N != N2)
876875
inline svector<T, N, A, Init>& svector<T, N, A, Init>::operator=(const svector<T, N2, A, I2>& rhs)
876+
requires(N != N2)
877877
{
878878
m_allocator = std::allocator_traits<allocator_type>::select_on_container_copy_construction(
879879
rhs.get_allocator()

include/xtensor/generators/xgenerator.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ namespace xt
8484
*************************************/
8585

8686
template <xgenerator_concept E>
87-
requires without_memory_address_concept<E>
87+
requires(without_memory_address_concept<E>)
8888
struct overlapping_memory_checker_traits<E>
8989
{
9090
static bool check_overlap(const E&, const memory_range&)
@@ -168,8 +168,8 @@ namespace xt
168168
const_stepper stepper_end(const O& shape, layout_type) const noexcept;
169169

170170
template <class E, class FE = F>
171-
requires has_assign_to_v<E, FE>
172-
void assign_to(xexpression<E>& e) const noexcept;
171+
void assign_to(xexpression<E>& e) const noexcept
172+
requires(has_assign_to_v<E, FE>);
173173

174174
const functor_type& functor() const noexcept;
175175

@@ -375,8 +375,8 @@ namespace xt
375375

376376
template <class F, class R, class S>
377377
template <class E, class FE>
378-
requires has_assign_to_v<E, FE>
379378
inline void xgenerator<F, R, S>::assign_to(xexpression<E>& e) const noexcept
379+
requires(has_assign_to_v<E, FE>)
380380
{
381381
e.derived_cast().resize(m_shape);
382382
m_f.assign_to(e);

include/xtensor/misc/xset_operation.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ namespace xt
8888
* @return a boolean array
8989
*/
9090
template <class E, class F>
91-
requires has_iterator_interface_concept<F>
9291
inline auto isin(E&& element, F&& test_elements) noexcept
92+
requires(has_iterator_interface_concept<F>)
9393
{
9494
auto lambda = detail::lambda_isin<std::is_lvalue_reference<F>::value>::make(std::forward<F>(test_elements
9595
));
@@ -145,8 +145,8 @@ namespace xt
145145
* @return a boolean array
146146
*/
147147
template <class E, class F>
148-
requires has_iterator_interface_concept<F>
149148
inline auto in1d(E&& element, F&& test_elements) noexcept
149+
requires(has_iterator_interface_concept<F>)
150150
{
151151
XTENSOR_ASSERT(element.dimension() == 1ul);
152152
XTENSOR_ASSERT(test_elements.dimension() == 1ul);

0 commit comments

Comments
 (0)