this operator here:
/**
* Implicit cast to const
* Vector<Number>. This cast
* allows the use of this object
* everywhere a const
* Vector<double> is required.
*/
operator const Vector<Number> &() const;
will never be called as per the C++ standard because VectorView is derived
from Vector<Number> and the standard says this:
A conversion function is never used to convert a (possibly cv-qualified)
object to the (possibly cv-qualified) same object type (or a reference to
it), to a (possibly cv-qualified) base class of that type (or a reference
to it), or to (possibly cv-qualified) void.
Note the piece about the base class. In other words, the presence of the
operator in the current implementation has no impact since it will never be
called.
This also fixes the following warning from ICC:
/scratch/bangert/p/deal.II/1/deal.II/include/deal.II/lac/vector_view.h(173): warning #597: "dealii::VectorView<Number>::operator const dealii::Vector<PetscScalar={double}> &() const [with Number=PetscScalar={double}]" will not be called for implicit or explicit conversions
operator const Vector<Number> &() const;
^
detected during:
instantiation of class "dealii::VectorView<Number> [with Number=PetscScalar={double}]" at line 925 of "/scratch/bangert/p/deal.II/1/deal.II/include/deal.II/lac/parallel_vector.h"
instantiation of class "dealii::parallel::distributed::Vector<Number> [with Number=double]" at line 1023 of "/scratch/bangert/p/deal.II/1/deal.II/source/numerics/error_estimator.cc"
instantiation of "void dealii::KellyErrorEstimator<1, spacedim>::estimate(const dealii::Mapping<1, spacedim> &, const DH &, const dealii::Quadrature<0> &, const dealii::FunctionMap<spacedim>::type &, const InputVector &, dealii::Vector<float> &, const std::vector<bool, std::allocator<bool>> &, const dealii::Function<spacedim> *, unsigned int, dealii::types::subdomain_id_t={unsigned int}, dealii::types::material_id_t={unsigned char}) [with spacedim=1,
InputVector=dealii::parallel::distributed::Vector<double>, DH=dealii::DoFHandler<1, 1>]" at line 156 of "/scratch/bangert/p/deal.II/1/deal.II/source/numerics/error_estimator.inst"
git-svn-id: https://svn.dealii.org/trunk@25696
0785d39b-7218-0410-832d-
ea1e28bc413d
* memory. */
~VectorView();
- /**
- * Implicit cast to const
- * Vector<Number>. This cast
- * allows the use of this object
- * everywhere a const
- * Vector<double> is required.
- */
- operator const Vector<Number> &() const;
-
/**
* The reinit function of this object has
* a behavior which is different from the
}
-template<typename Number>
-inline
-VectorView<Number>::operator const Vector<Number> &() const
-{
- return static_cast<const Vector<Number> &> (*this);
-}
-
-
template<typename Number>
inline
void VectorView<Number>::reinit(const unsigned int N, const bool fast)