[dune-pdelab] [dune-pdelab-commit] dune-pdelab - Commit a434d43: [ISTL] Make vector_iterator a friend of all other vector_iterators, independent of template arguments
Christian Engwer
christian.engwer at uni-muenster.de
Wed Dec 19 13:50:54 CET 2012
On Wed, Dec 19, 2012 at 11:55:30AM +0100, Steffen Müthing wrote:
> New commit, added to repository at Wed Dec 19 11:55:30 2012 +0100
> as part of the following ref changes:
>
> branch refs/heads/feature/new-dof-handling updated from f57bfaf -> 006a003
>
> Browsable version: http://cgit.dune-project.org/repositories/dune-pdelab/commit/?id=a434d43cc4985c523b092758359231f041a8ab93
>
> ======================================================================
>
> commit a434d43cc4985c523b092758359231f041a8ab93
> Author: Steffen Müthing <muething at dune-project.org>
> Date: Wed Dec 19 11:42:17 2012 +0100
>
> [ISTL] Make vector_iterator a friend of all other vector_iterators, independent of template arguments
>
> vector_iterator needs to be able to access the private members of other vector_iterators
> with different template parameters to implement const <-> non-const interoperability.
actually it should be sufficient to only have the friend for
friend class vector_iterator<const V>;
friend class vector_iterator< typename RemoveConst<V>::Type >;
shouldn't it?!
> dune/pdelab/backend/istl/vectoriterator.hh | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
>
>
> diff --git a/dune/pdelab/backend/istl/vectoriterator.hh b/dune/pdelab/backend/istl/vectoriterator.hh
> index 4f10ff2..e3e3e84 100644
> --- a/dune/pdelab/backend/istl/vectoriterator.hh
> +++ b/dune/pdelab/backend/istl/vectoriterator.hh
> @@ -179,7 +179,7 @@ namespace Dune {
> }
>
> template<typename V>
> - struct vector_iterator
> + class vector_iterator
> : public impl::vector_iterator_base<V>
> {
>
> @@ -190,6 +190,9 @@ namespace Dune {
> typedef typename impl::extract_iterators<V>::type Iterators;
> static const bool is_const = BaseT::is_const;
>
> + template<typename>
> + friend class vector_iterator;
> +
> public:
>
> vector_iterator(vector_reference vector, bool at_end)
>
> _______________________________________________
> dune-pdelab-commit mailing list
> dune-pdelab-commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-pdelab-commit
--
Prof. Dr. Christian Engwer
Institut für Numerische und Angewandte Mathematik
Fachbereich Mathematik und Informatik der Universität Münster
Einsteinstrasse 62
48149 Münster
E-Mail christian.engwer at uni-muenster.de
Telefon +49 251 83-35067
FAX +49 251 83-32729
More information about the dune-pdelab
mailing list