From: David Wells Date: Sun, 15 Jan 2017 02:53:53 +0000 (-0500) Subject: Get rid of some unused friendship declarations. X-Git-Tag: v8.5.0-rc1~237^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3801%2Fhead;p=dealii.git Get rid of some unused friendship declarations. Clang warns about the second one with the following: /home/drwells/Documents/Code/CPP/dealii-dev-clang/include/deal.II/lac/sparse_matrix.h:1645:93: warning: dependent nested name specifier 'SparseMatrixIterators::Accessor::' for friend class declaration is not supported; turning off access control for 'SparseMatrix' [-Wunsupported-friend] template friend class SparseMatrixIterators::Accessor::Reference; Additionally, MSVC runs into errors with this friendship declaration (and can compile the library without it), so we can get rid of it. --- diff --git a/include/deal.II/lac/sparse_matrix.h b/include/deal.II/lac/sparse_matrix.h index f2e59ffe7b..316cd66e0d 100644 --- a/include/deal.II/lac/sparse_matrix.h +++ b/include/deal.II/lac/sparse_matrix.h @@ -281,12 +281,6 @@ namespace SparseMatrixIterators */ template friend class Iterator; - - /** - * Make the SparseMatrix class a friend so that it, in turn, can declare - * the Reference class a friend. - */ - template friend class dealii::SparseMatrix; }; @@ -1637,13 +1631,6 @@ private: */ template friend class SparseMatrixIterators::Iterator; template friend class SparseMatrixIterators::Accessor; - -#ifndef DEAL_II_MSVC - // Visual studio is choking on the following friend declaration, probably - // because Reference is only defined in a specialization. It looks like - // the library is compiling without this line, though. - template friend class SparseMatrixIterators::Accessor::Reference; -#endif }; #ifndef DOXYGEN