Skip to content

Commit f959b36

Browse files
author
Alexandre Hoffmann
committed
with precommit
1 parent f8d7fba commit f959b36

File tree

5 files changed

+134
-116
lines changed

5 files changed

+134
-116
lines changed

include/xtensor/containers/xfixed.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +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) xfixed_container(nested_initializer_list_t<value_type, N> t);
329+
requires(IX::value != 0)
330+
xfixed_container(nested_initializer_list_t<value_type, N> t);
330331

331332
~xfixed_container() = default;
332333

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

include/xtensor/containers/xstorage.hpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -671,15 +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) explicit svector(const svector<T, N2, A, I2>& rhs);
674+
requires(N != N2)
675+
explicit svector(const svector<T, N2, A, I2>& rhs);
675676

676677
svector& operator=(const svector& rhs);
677678
svector& operator=(svector&& rhs) noexcept(std::is_nothrow_move_assignable<value_type>::value);
678679
svector& operator=(const std::vector<T>& rhs);
679680
svector& operator=(std::initializer_list<T> il);
680681

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

684686
svector(const svector& other);
685687
svector(svector&& other) noexcept(std::is_nothrow_move_constructible<value_type>::value);
@@ -810,7 +812,8 @@ namespace xt
810812

811813
template <class T, std::size_t N, class A, bool Init>
812814
template <std::size_t N2, bool I2>
813-
requires(N != N2) inline svector<T, N, A, Init>::svector(const svector<T, N2, A, I2>& rhs)
815+
requires(N != N2)
816+
inline svector<T, N, A, Init>::svector(const svector<T, N2, A, I2>& rhs)
814817
: m_allocator(rhs.get_allocator())
815818
{
816819
assign(rhs.begin(), rhs.end());
@@ -869,9 +872,8 @@ namespace xt
869872

870873
template <class T, std::size_t N, class A, bool Init>
871874
template <std::size_t N2, bool I2>
872-
requires(N != N2) inline svector<T, N, A, Init>& svector<T, N, A, Init>::operator=(
873-
const svector<T, N2, A, I2>& rhs
874-
)
875+
requires(N != N2)
876+
inline svector<T, N, A, Init>& svector<T, N, A, Init>::operator=(const svector<T, N2, A, I2>& rhs)
875877
{
876878
m_allocator = std::allocator_traits<allocator_type>::select_on_container_copy_construction(
877879
rhs.get_allocator()

include/xtensor/generators/xgenerator.hpp

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

8686
template <xgenerator_concept E>
87-
requires without_memory_address_concept<E> struct overlapping_memory_checker_traits<E>
87+
requires without_memory_address_concept<E>
88+
struct overlapping_memory_checker_traits<E>
8889
{
8990
static bool check_overlap(const E&, const memory_range&)
9091
{
@@ -167,7 +168,8 @@ namespace xt
167168
const_stepper stepper_end(const O& shape, layout_type) const noexcept;
168169

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

172174
const functor_type& functor() const noexcept;
173175

@@ -373,7 +375,8 @@ namespace xt
373375

374376
template <class F, class R, class S>
375377
template <class E, class FE>
376-
inline requires has_assign_to_v<E, FE> void xgenerator<F, R, S>::assign_to(xexpression<E>& e) const noexcept
378+
requires has_assign_to_v<E, FE>
379+
inline void xgenerator<F, R, S>::assign_to(xexpression<E>& e) const noexcept
377380
{
378381
e.derived_cast().resize(m_shape);
379382
m_f.assign_to(e);

include/xtensor/misc/xset_operation.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ namespace xt
8888
* @return a boolean array
8989
*/
9090
template <class E, class F>
91-
inline requires has_iterator_interface_concept<F> auto isin(E&& element, F&& test_elements) noexcept
91+
requires has_iterator_interface_concept<F>
92+
inline auto isin(E&& element, F&& test_elements) noexcept
9293
{
9394
auto lambda = detail::lambda_isin<std::is_lvalue_reference<F>::value>::make(std::forward<F>(test_elements
9495
));
@@ -144,7 +145,8 @@ namespace xt
144145
* @return a boolean array
145146
*/
146147
template <class E, class F>
147-
inline requires has_iterator_interface_concept<F> auto in1d(E&& element, F&& test_elements) noexcept
148+
requires has_iterator_interface_concept<F>
149+
inline auto in1d(E&& element, F&& test_elements) noexcept
148150
{
149151
XTENSOR_ASSERT(element.dimension() == 1ul);
150152
XTENSOR_ASSERT(test_elements.dimension() == 1ul);

0 commit comments

Comments
 (0)