From 9f17e789849a811c46e04243ffaa58b97fcfc59c Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Wed, 2 Jul 2025 14:04:29 -0500 Subject: [PATCH] parallel::distributed::Vector: static_assert proper number type for MemorySpace::Default --- include/deal.II/lac/la_parallel_vector.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/deal.II/lac/la_parallel_vector.h b/include/deal.II/lac/la_parallel_vector.h index af3020bef5..777a2b8391 100644 --- a/include/deal.II/lac/la_parallel_vector.h +++ b/include/deal.II/lac/la_parallel_vector.h @@ -272,6 +272,11 @@ namespace LinearAlgebra std::is_same_v, "MemorySpace should be Host or Default"); + static_assert( + (!std::is_same_v) || + std::is_same_v || std::is_same_v, + "Number should be float or double for Default memory space"); + /** * @name 1: Basic Object-handling */ -- 2.39.5