* Start update_ghost_value for serial vectors
*/
template <typename VectorType,
- typename std::enable_if<is_not_parallel_vector<VectorType>::value,
+ typename std::enable_if<is_not_parallel_vector<VectorType>,
VectorType>::type * = nullptr>
void
update_ghost_values_start(const unsigned int /*component_in_block_vector*/,
template <
typename VectorType,
typename std::enable_if<!has_update_ghost_values_start<VectorType> &&
- !is_not_parallel_vector<VectorType>::value,
+ !is_not_parallel_vector<VectorType>,
VectorType>::type * = nullptr>
void
update_ghost_values_start(const unsigned int component_in_block_vector,
* Start compress for serial vectors
*/
template <typename VectorType,
- typename std::enable_if<is_not_parallel_vector<VectorType>::value,
+ typename std::enable_if<is_not_parallel_vector<VectorType>,
VectorType>::type * = nullptr>
void
compress_start(const unsigned int /*component_in_block_vector*/,
* Start compress for vectors that do not support
* the split into _start() and finish() stages
*/
- template <
- typename VectorType,
- typename std::enable_if<!has_compress_start<VectorType> &&
- !is_not_parallel_vector<VectorType>::value,
- VectorType>::type * = nullptr>
+ template <typename VectorType,
+ typename std::enable_if<!has_compress_start<VectorType> &&
+ !is_not_parallel_vector<VectorType>,
+ VectorType>::type * = nullptr>
void
compress_start(const unsigned int component_in_block_vector,
VectorType & vec)
* Reset all ghost values for serial vectors
*/
template <typename VectorType,
- typename std::enable_if<is_not_parallel_vector<VectorType>::value,
+ typename std::enable_if<is_not_parallel_vector<VectorType>,
VectorType>::type * = nullptr>
void
reset_ghost_values(const VectorType & /*vec*/) const
* Reset all ghost values for vector that don't support
* exchange on a subset of DoFs
*/
- template <
- typename VectorType,
- typename std::enable_if<!has_exchange_on_subset<VectorType> &&
- !is_not_parallel_vector<VectorType>::value,
- VectorType>::type * = nullptr>
+ template <typename VectorType,
+ typename std::enable_if<!has_exchange_on_subset<VectorType> &&
+ !is_not_parallel_vector<VectorType>,
+ VectorType>::type * = nullptr>
void
reset_ghost_values(const VectorType &vec) const
{
using not_parallel_vector_t =
std::integral_constant<bool, is_serial_vector<T>::value>;
- template <class T>
- using is_not_parallel_vector =
- SupportsOperation::detected_or_t<std::true_type, not_parallel_vector_t, T>;
+ /**
+ * A predicate stating whether something is a vector type. We test this
+ * by seeing whether the `is_serial_vector` type is declared for the
+ * given vector type.
+ */
+ template <class VectorType>
+ using is_vector_type = decltype(is_serial_vector<VectorType>::value);
+
+ /**
+ * A predicate stating whether something is a vector type and is
+ * indeed a serial vector.
+ */
+ template <class VectorType>
+ using is_serial_vector_type = decltype(
+ typename std::enable_if<is_serial_vector<VectorType>::value, int>::type());
+
+ /**
+ * A variable that indicates that the type `T` is either (i) not
+ * a vector type at all, or (ii) if it is a vector type,
+ * that it is not a parallel vector type.
+ */
+ template <class VectorType>
+ constexpr bool is_not_parallel_vector =
+ (is_supported_operation<is_vector_type, VectorType> == false) ||
+ (is_supported_operation<is_serial_vector_type, VectorType> == true);
} // namespace internal
#endif