]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make things more standards compliant by adding typename keywords.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 26 Apr 2001 14:27:08 +0000 (14:27 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 26 Apr 2001 14:27:08 +0000 (14:27 +0000)
git-svn-id: https://svn.dealii.org/branches/Branch-3-1@4491 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/thread_management.h

index 0a5ab9eaec3a9e0560bfd08cb9cdb7cb153389a9..4e154f5b9215374b31bdec6418b50545ce19d7f4 100644 (file)
@@ -333,6 +333,9 @@ namespace Threads
                                        */
       static void * thread_entry_point (void *arg);
 
+
+//TODO:[WB] (compiler) with some compilers we get into trouble if the following class is not public, since we can't somehow declare the encapsulate function as friend. change this when compilers accept the friend declaration
+  public:
                                       /**
                                        * Helper class, used to collect
                                        * the values of the parameters
@@ -349,7 +352,7 @@ namespace Threads
                                            * underlying class to a
                                            * local type.
                                            */
-         typedef FunData0<RetType>::FunPtr FunPtr;
+         typedef typename FunData0<RetType>::FunPtr FunPtr;
        
                                           /**
                                            * Constructor. Take and store a
@@ -471,7 +474,7 @@ namespace Threads
                                            * underlying class to a
                                            * local type.
                                            */
-         typedef FunData1<Arg1,RetType>::FunPtr FunPtr;
+         typedef typename FunData1<Arg1,RetType>::FunPtr FunPtr;
        
                                           /**
                                            * Constructor. Take and store a
@@ -585,7 +588,7 @@ namespace Threads
                                            * underlying class to a
                                            * local type.
                                            */
-         typedef FunData2<Arg1,Arg2,RetType>::FunPtr FunPtr;
+         typedef typename FunData2<Arg1,Arg2,RetType>::FunPtr FunPtr;
        
                                           /**
                                            * Constructor. Take and store a
@@ -701,7 +704,7 @@ namespace Threads
                                            * underlying class to a
                                            * local type.
                                            */
-         typedef FunData3<Arg1,Arg2,Arg3,RetType>::FunPtr FunPtr;
+         typedef typename FunData3<Arg1,Arg2,Arg3,RetType>::FunPtr FunPtr;
        
                                           /**
                                            * Constructor. Take and store a
@@ -820,7 +823,7 @@ namespace Threads
                                            * underlying class to a
                                            * local type.
                                            */
-         typedef FunData4<Arg1,Arg2,Arg3,Arg4,RetType>::FunPtr FunPtr;
+         typedef typename FunData4<Arg1,Arg2,Arg3,Arg4,RetType>::FunPtr FunPtr;
        
                                           /**
                                            * Constructor. Take and store a
@@ -943,7 +946,7 @@ namespace Threads
                                            * underlying class to a
                                            * local type.
                                            */
-         typedef FunData5<Arg1,Arg2,Arg3,Arg4,Arg5,RetType>::FunPtr FunPtr;
+         typedef typename FunData5<Arg1,Arg2,Arg3,Arg4,Arg5,RetType>::FunPtr FunPtr;
        
                                           /**
                                            * Constructor. Take and store a
@@ -1068,7 +1071,7 @@ namespace Threads
                                            * underlying class to a
                                            * local type.
                                            */
-         typedef FunData6<Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,RetType>::FunPtr FunPtr;
+         typedef typename FunData6<Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,RetType>::FunPtr FunPtr;
        
                                           /**
                                            * Constructor. Take and store a
@@ -1197,7 +1200,7 @@ namespace Threads
                                            * underlying class to a
                                            * local type.
                                            */
-         typedef FunData7<Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,RetType>::FunPtr FunPtr;
+         typedef typename FunData7<Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,RetType>::FunPtr FunPtr;
        
                                           /**
                                            * Constructor. Take and store a
@@ -1329,7 +1332,7 @@ namespace Threads
                                            * underlying class to a
                                            * local type.
                                            */
-         typedef FunData8<Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,RetType>::FunPtr FunPtr;
+         typedef typename FunData8<Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,RetType>::FunPtr FunPtr;
        
                                           /**
                                            * Constructor. Take and store a
@@ -1449,7 +1452,7 @@ namespace Threads
                                            * underlying class to a
                                            * local type.
                                            */
-         typedef MemFunData0<Class,RetType>::FunPtr FunPtr;
+         typedef typename MemFunData0<Class,RetType>::FunPtr FunPtr;
        
                                           /**
                                            * Constructor. Take and store a
@@ -1582,7 +1585,7 @@ namespace Threads
                                            * underlying class to a
                                            * local type.
                                            */
-         typedef MemFunData1<Class,Arg1,RetType>::FunPtr FunPtr;
+         typedef typename MemFunData1<Class,Arg1,RetType>::FunPtr FunPtr;
        
                                           /**
                                            * Constructor. Take and store a
@@ -1719,7 +1722,7 @@ namespace Threads
                                            * underlying class to a
                                            * local type.
                                            */
-         typedef MemFunData2<Class,Arg1,Arg2,RetType>::FunPtr FunPtr;
+         typedef typename MemFunData2<Class,Arg1,Arg2,RetType>::FunPtr FunPtr;
        
                                           /**
                                            * Constructor. Take and store a
@@ -1859,7 +1862,7 @@ namespace Threads
                                            * underlying class to a
                                            * local type.
                                            */
-         typedef MemFunData3<Class,Arg1,Arg2,Arg3,RetType>::FunPtr FunPtr;
+         typedef typename MemFunData3<Class,Arg1,Arg2,Arg3,RetType>::FunPtr FunPtr;
        
                                           /**
                                            * Constructor. Take and store a
@@ -2004,7 +2007,7 @@ namespace Threads
                                            * underlying class to a
                                            * local type.
                                            */
-         typedef MemFunData4<Class,Arg1,Arg2,Arg3,Arg4,RetType>::FunPtr FunPtr;
+         typedef typename MemFunData4<Class,Arg1,Arg2,Arg3,Arg4,RetType>::FunPtr FunPtr;
        
                                           /**
                                            * Constructor. Take and store a
@@ -2152,7 +2155,7 @@ namespace Threads
                                            * underlying class to a
                                            * local type.
                                            */
-         typedef MemFunData5<Class,Arg1,Arg2,Arg3,Arg4,Arg5,RetType>::FunPtr FunPtr;
+         typedef typename MemFunData5<Class,Arg1,Arg2,Arg3,Arg4,Arg5,RetType>::FunPtr FunPtr;
        
                                           /**
                                            * Constructor. Take and store a
@@ -2305,7 +2308,7 @@ namespace Threads
                                            * underlying class to a
                                            * local type.
                                            */
-         typedef MemFunData6<Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,RetType>::FunPtr FunPtr;
+         typedef typename MemFunData6<Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,RetType>::FunPtr FunPtr;
        
                                           /**
                                            * Constructor. Take and store a
@@ -2673,7 +2676,7 @@ namespace Threads
                                    * @p{[begin[i],end[i])}.
                                    */
   template <typename ForwardIterator>
-  std::vector<std::pair<ForwardIterator,ForwardIterator> >
+  typename std::vector<typename std::pair<ForwardIterator,ForwardIterator> >
   split_range (const ForwardIterator &begin,
               const ForwardIterator &end,
               const unsigned int n_intervals);
@@ -4499,7 +4502,7 @@ namespace Threads
 
   
   template <typename ForwardIterator>
-  std::vector<std::pair<ForwardIterator,ForwardIterator> >
+  typename std::vector<typename std::pair<ForwardIterator,ForwardIterator> >
   split_range (const ForwardIterator &begin, const ForwardIterator &end,
               const unsigned int n_intervals)
   {

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.