From: David Wells Date: Sat, 7 May 2016 23:28:26 +0000 (-0400) Subject: Get around a GCC 6 warning. X-Git-Tag: v8.4.2-rc1~2^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3046%2Fhead;p=dealii.git 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. --- 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();