]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Get rid of some unused friendship declarations. 3801/head
authorDavid Wells <wellsd2@rpi.edu>
Sun, 15 Jan 2017 02:53:53 +0000 (21:53 -0500)
committerDavid Wells <wellsd2@rpi.edu>
Sun, 15 Jan 2017 02:53:53 +0000 (21:53 -0500)
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<number2, false>::' for friend
      class declaration is not supported; turning off access control for 'SparseMatrix'
      [-Wunsupported-friend]
  template <typename number2> friend class SparseMatrixIterators::Accessor<number2, false>::Reference;

Additionally, MSVC runs into errors with this friendship
declaration (and can compile the library without it), so we can get rid
of it.

include/deal.II/lac/sparse_matrix.h

index f2e59ffe7bd21063bb358c87ba8834b4fea270a5..316cd66e0d0fe6062748380f8d0a1d5822bf8b6d 100644 (file)
@@ -281,12 +281,6 @@ namespace SparseMatrixIterators
      */
     template <typename, bool>
     friend class Iterator;
-
-    /**
-     * Make the SparseMatrix class a friend so that it, in turn, can declare
-     * the Reference class a friend.
-     */
-    template <typename> friend class dealii::SparseMatrix;
   };
 
 
@@ -1637,13 +1631,6 @@ private:
    */
   template <typename,bool> friend class SparseMatrixIterators::Iterator;
   template <typename,bool> 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 <typename number2> friend class SparseMatrixIterators::Accessor<number2, false>::Reference;
-#endif
 };
 
 #ifndef DOXYGEN

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.