dbertoni 00/06/01 08:23:21
Modified: c/src/PlatformSupport STLHelper.hpp
Log:
Removed use of typename, which was confusing gcc.
Revision Changes Path
1.7 +12 -55 xml-xalan/c/src/PlatformSupport/STLHelper.hpp
Index: STLHelper.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/STLHelper.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- STLHelper.hpp 2000/05/11 19:03:00 1.6
+++ STLHelper.hpp 2000/06/01 15:23:20 1.7
@@ -82,8 +82,8 @@
*
* @param thePointer pointer to object to be deleted
*/
- typename result_type
- operator()(typename argument_type thePointer) const
+ result_type
+ operator()(argument_type thePointer) const
{
delete thePointer;
}
@@ -129,7 +129,7 @@
-#if ! defined(__GNUC__)
+#if !defined(XALAN_SGI_BASED_STL)
/**
* Functor to retrieve the key of a key-value pair in a map, used in STL
@@ -179,7 +179,7 @@
* @return value
*/
typename result_type
- operator()(const typename argument_type& thePair)
+ operator()(const typename argument_type& thePair) const
{
return thePair.second;
}
@@ -205,8 +205,8 @@
*
* @param thePair key-value pair
*/
- typename result_type
- operator()(typename argument_type thePair)
+ result_type
+ operator()(argument_type thePair) const
{
delete thePair.second;
}
@@ -236,8 +236,8 @@
*
* @param thePair key-value pair
*/
- typename result_type
- operator()(typename argument_type thePair)
+ result_type
+ operator()(argument_type thePair)
{
delete thePair.first;
}
@@ -255,49 +255,6 @@
/**
- * Template allows nested execution of for_each algorithm by defining a unary
- * functor that takes a container object as an argument, allowing iteration
- * through the container.
- */
-template<class T, class Functor>
-#if defined(XALAN_NO_NAMESPACES)
-struct nested_for_each_functor : public unary_function<const T::value_type&,
Functor>
-#else
-struct nested_for_each_functor : public std::unary_function<const typename
T::value_type&, Functor>
-#endif
-{
- /**
- * Construct a nested_for_each_functor instance.
- *
- * @param theFunctor functor to use as return type
- */
- nested_for_each_functor(Functor theFunctor) :
- m_functor(theFunctor)
- {
- }
-
- /**
- * Execute the () operator, with the side effect of calling for_each on
- * each element in the container argument with the functor member.
- *
- * @param theContainer container object
- */
- typename T::result_type
- operator()(typename argument_type theContainer)
- {
- return for_each(theContainer.begin(),
- theContainer.end(),
- m_functor);
- }
-
-private:
-
- Functor m_functor;
-};
-
-
-
-/**
* This functor is designed to compare 0-terminated arrays. It substitutes
* for the default less<type*> so that pointers to arrays can be compared,
* rather than copies of arrays. For example, you might want to use C-style
@@ -321,9 +278,10 @@
* @param theRHS second object to compare
* @return true if objects are the same
*/
- typename result_type
- operator()(typename first_argument_type theLHS,
- typename second_argument_type theRHS) const
+ result_type
+ operator()(
+ first_argument_type theLHS,
+ second_argument_type theRHS) const
{
while(*theLHS && *theRHS)
{
@@ -341,7 +299,6 @@
return *theLHS < *theRHS ? true : false;
}
};
-