Author: rhys
Date: Tue Feb 18 14:24:23 2014
New Revision: 1569339
URL: http://svn.apache.org/r1569339
Log:
Place LevelPtr::operator== into namespace helper
Fixes the following compilation error on GCC 4.8.1:
src/main/include/log4cxx/level.h:279:67: error: specialization of
‘template<class T> bool log4cxx::helpers::ObjectPtrT<T>::operator==(const
log4cxx::helpers::ObjectPtrT<T>&) const’ in different namespace [-fpermissive]
template<> inline bool LevelPtr::operator==(const LevelPtr& rhs) const
Modified:
incubator/log4cxx/trunk/src/main/include/log4cxx/level.h
Modified: incubator/log4cxx/trunk/src/main/include/log4cxx/level.h
URL:
http://svn.apache.org/viewvc/incubator/log4cxx/trunk/src/main/include/log4cxx/level.h?rev=1569339&r1=1569338&r2=1569339&view=diff
==============================================================================
--- incubator/log4cxx/trunk/src/main/include/log4cxx/level.h (original)
+++ incubator/log4cxx/trunk/src/main/include/log4cxx/level.h Tue Feb 18
14:24:23 2014
@@ -270,12 +270,14 @@ namespace log4cxx
Level& operator=(const Level&);
};
- /**
+ /*
* We need to double some logic from LOG4CXX_PTR_DEF or else we are
unable to override the
* comparison operator, which we need to properly fix LOGCXX-394.
*
* https://issues.apache.org/jira/browse/LOGCXX-394
*/
+ namespace helpers {
+
template<> inline bool LevelPtr::operator==(const LevelPtr& rhs) const
{ return (*this)->equals(rhs); }
template<> inline bool LevelPtr::operator!=(const LevelPtr& rhs) const
@@ -288,6 +290,9 @@ namespace log4cxx
extern template class LOG4CXX_EXPORT
log4cxx::helpers::ObjectPtrT<Level>;
#pragma warning(pop)
#endif
+
+ }
+
}
#define DECLARE_LOG4CXX_LEVEL(level)\