From d4f38d8ec575683f4db10c2814f49da0a43d82e1 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 7 May 2016 19:28:26 -0400 Subject: [PATCH] Get around a GCC 6 warning. GCC 6.1 now warns (-Waddress) that (since the dynamic cast of an object back to its own type always succeeds) the address of an object is always nonzero, so these casts result in tautologies for valid vector types. --- include/deal.II/numerics/vector_tools.templates.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index e6889a36b4..e1af4962ca 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -6972,15 +6972,8 @@ namespace VectorTools } else { - // This function is not implemented for distributed vectors, so - // if v is not a boring Vector or BlockVector: - Assert( dynamic_cast *>(& v) - || dynamic_cast *>(& v) - || dynamic_cast *>(& v) - || dynamic_cast *>(& v) - || dynamic_cast *>(& v) - || dynamic_cast *>(& v), - ExcNotImplemented()); + // This function is not implemented for distributed vectors. + Assert(!v.supports_distributed_data, ExcNotImplemented()); const unsigned int n = v.size(); -- 2.39.5