Skip to content

Commit

Permalink
Cleanup some more requires
Browse files Browse the repository at this point in the history
  • Loading branch information
wichtounet committed Dec 10, 2023
1 parent fe56849 commit 94bcb13
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/etl/adapters/uni_lower.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ struct uni_lower_matrix final : adapter<Matrix>, iterable<const uni_lower_matrix
* \param e The ETL expression to get the values from
* \return a reference to the fast matrix
*/
template <etl_expr E>
uni_lower_matrix& operator=(E&& e) noexcept(false) requires(std::convertible_to<value_t<E>, value_type>) {
template <convertible_expr<value_type> E>
uni_lower_matrix& operator=(E&& e) noexcept(false) {
// Make sure the other matrix is uni lower triangular
if (!is_uni_lower_triangular(e)) {
throw uni_lower_exception();
Expand Down
4 changes: 2 additions & 2 deletions include/etl/custom_fast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ struct custom_fast_matrix_impl final : fast_matrix_base<custom_fast_matrix_impl<
* \param e The ETL expression to get the values from
* \return a reference to the fast matrix
*/
template <etl_expr E>
custom_fast_matrix_impl& operator=(E&& e) requires(std::convertible_to<value_t<E>, value_type>) {
template <convertible_expr<value_type> E>
custom_fast_matrix_impl& operator=(E&& e) {
validate_assign(*this, e);

// Avoid aliasing issues
Expand Down
4 changes: 2 additions & 2 deletions include/etl/op/scalar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ struct scalar {
* \brief Builds a new scalar from a convertible type
* \þaram v The scalar value
*/
template <typename C>
explicit constexpr scalar(C c) requires(std::convertible_to<C, T>) : value(static_cast<T>(c)) {}
template <std::convertible_to<T> C>
explicit constexpr scalar(C c) : value(static_cast<T>(c)) {}

/*!
* \brief Returns the element at the given index
Expand Down

0 comments on commit 94bcb13

Please sign in to comment.