diff --git a/include/pressio/expressions/column.hpp b/include/pressio/expressions/column.hpp index 4db41d8..8cf980e 100644 --- a/include/pressio/expressions/column.hpp +++ b/include/pressio/expressions/column.hpp @@ -60,17 +60,13 @@ auto column(T & operand, IndexType colIndex) // note that this works also when T is const-qualified // because that qualification carries over to the impl - constexpr bool constraint = false -#ifdef PRESSIO_ENABLE_TPL_EIGEN - || is_dense_matrix_eigen::value -#endif -#ifdef PRESSIO_ENABLE_TPL_TRILINOS + constexpr bool constraint = + is_dense_matrix_eigen::value || is_multi_vector_tpetra::value - || is_multi_vector_tpetra_block::value -#endif - ; - static_assert(constraint, "pressio::column() currently supported only for " - "an Eigen dynamic matrix, a tpetra or tpetra-block multivector"); + || is_multi_vector_tpetra_block::value; + static_assert(constraint, + "pressio::column() currently supported only for " + "an Eigen dynamic matrix, a tpetra or tpetra-block multivector"); static_assert(Traits< std::remove_const_t >::rank==2, "column can only be applied to a rank-2 object."); diff --git a/include/pressio/expressions/diagonal.hpp b/include/pressio/expressions/diagonal.hpp index 4d70770..465c371 100644 --- a/include/pressio/expressions/diagonal.hpp +++ b/include/pressio/expressions/diagonal.hpp @@ -60,16 +60,12 @@ auto diagonal(T & operand) // note that this works also when T is const-qualified // because that qualification carries over to the impl - constexpr bool constraint = false -#ifdef PRESSIO_ENABLE_TPL_KOKKOS - || is_dense_matrix_kokkos::value -#endif -#ifdef PRESSIO_ENABLE_TPL_EIGEN - || is_dense_matrix_eigen::value -#endif - ; - static_assert(constraint, "pressio::diagonal() currently supported only for an Eigen dynamic matrix" - " or a Kokkos rank-2 View."); + constexpr bool constraint = + is_dense_matrix_kokkos::value + || is_dense_matrix_eigen::value; + static_assert(constraint, + "pressio::diagonal() currently supported only for an Eigen dynamic matrix" + " or a Kokkos rank-2 View."); static_assert(Traits::rank==2, "diagonal can only be applied to a rank-2 object."); diff --git a/include/pressio/expressions/span.hpp b/include/pressio/expressions/span.hpp index 1075351..bdd63b0 100644 --- a/include/pressio/expressions/span.hpp +++ b/include/pressio/expressions/span.hpp @@ -60,16 +60,11 @@ auto span(T & operand, IndexType startIndex, IndexType extent) // note that this works also when T is const-qualified // because that qualification carries over to the impl - constexpr bool constraint = false -#ifdef PRESSIO_ENABLE_TPL_KOKKOS - || is_vector_kokkos::value -#endif -#ifdef PRESSIO_ENABLE_TPL_EIGEN - || is_dynamic_vector_eigen::value -#endif - ; - static_assert(constraint, "pressio::span() currently supported only for an Eigen dynamic vector" - " or a Kokkos View."); + constexpr bool constraint = is_vector_kokkos::value + || is_dynamic_vector_eigen::value; + static_assert(constraint, + "pressio::span() currently supported only for an Eigen dynamic vector" + " or a Kokkos View."); static_assert(Traits< std::remove_const_t >::rank==1, "span can only be applied to a rank-1 object."); diff --git a/include/pressio/expressions/subspan.hpp b/include/pressio/expressions/subspan.hpp index d0170db..876f802 100644 --- a/include/pressio/expressions/subspan.hpp +++ b/include/pressio/expressions/subspan.hpp @@ -62,16 +62,11 @@ auto subspan(T & operand, // note that this works also when T is const-qualified // because that qualification carries over to the impl - constexpr bool constraint = false -#ifdef PRESSIO_ENABLE_TPL_KOKKOS - || is_dense_matrix_kokkos::value -#endif -#ifdef PRESSIO_ENABLE_TPL_EIGEN - || is_dense_matrix_eigen::value -#endif - ; - static_assert(constraint, "pressio::subspan() currently supported only for an Eigen dynamic matrix" - " or a Kokkos rank-2 View."); + constexpr bool constraint = is_dense_matrix_kokkos::value + || is_dense_matrix_eigen::value; + static_assert(constraint, + "pressio::subspan() currently supported only for an Eigen dynamic matrix" + " or a Kokkos rank-2 View."); static_assert(Traits::rank==2, "subspan can only be applied to a rank-2 object.");