From: bangerth Date: Wed, 9 Nov 2011 17:00:46 +0000 (+0000) Subject: Fix a problem with the intel compiler and VectorReference objects. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90e45df08b8754b9bcb2142788d1fa13da441b92;p=dealii-svn.git Fix a problem with the intel compiler and VectorReference objects. git-svn-id: https://svn.dealii.org/trunk@24740 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index c39d3e4bc9..9aeb6cb33e 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -34,6 +34,11 @@ inconvenience this causes.

General

    +
  1. Fixed: The Intel compiler complains that it can't copy Trilinos vector +reference objects, preventing the compiling of step-32. This is now fixed. +
    +(Wolfgang Bangerth, 2011/11/09) +
  2. Fixed: Intel ICC 12.1 gets into trouble with BOOST because BOOST believes that the compiler supports C++0x but one then still has to specify the corresponding flag on the command line to avoid compiler diff --git a/deal.II/include/deal.II/lac/trilinos_vector_base.h b/deal.II/include/deal.II/lac/trilinos_vector_base.h index 914b628b24..d646ec54b6 100644 --- a/deal.II/include/deal.II/lac/trilinos_vector_base.h +++ b/deal.II/include/deal.II/lac/trilinos_vector_base.h @@ -121,6 +121,13 @@ namespace TrilinosWrappers const VectorReference & operator = (const VectorReference &r) const; + /** + * Same as above but for non-const + * reference objects. + */ + const VectorReference & + operator = (const VectorReference &r); + /** * Set the referenced element of the * vector to s. @@ -1041,6 +1048,17 @@ namespace TrilinosWrappers + inline + const VectorReference & + VectorReference::operator = (const VectorReference &r) + { + // as above + *this = static_cast (r); + + return *this; + } + + inline const VectorReference & VectorReference::operator = (const TrilinosScalar &value) const