From b919905c49241b83ef5b4a6c6425c4033bde2459 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 dbf4030aab..e1f47314f4 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -7086,15 +7086,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