#include <vector>
#include <algorithm>
#include <lib/base/smartptr.h>
+#include <lib/base/eerror.h>
template <class T>
class ePtrList : public std::list<T*>
inline const T* last() const;
// added operator methods
- inline operator bool();
- inline bool operator!();
+ inline operator bool() const;
+ inline bool operator!() const;
// added compare struct ... to sort
struct less;
/////////////////// ePtrList operator bool ////////////////////
template <class T>
-ePtrList<T>::operator bool()
+ePtrList<T>::operator bool() const
{
// Returns a bool that contains true, when the list is NOT empty otherwise false
return !std::list<T*>::empty();
}
template <class T>
-bool ePtrList<T>::operator!()
+bool ePtrList<T>::operator!() const
{
// Returns a bool that contains true, when the list is empty otherwise false
return std::list<T*>::empty();
inline const T* last() const;
// added operator methods
- inline operator bool();
- inline bool operator!();
+ inline operator bool() const;
+ inline bool operator!() const;
// added compare struct ... to sort
struct less;
/////////////////// eSmartPtrList operator bool ////////////////////
template <class T>
-eSmartPtrList<T>::operator bool()
+eSmartPtrList<T>::operator bool() const
{
// Returns a bool that contains true, when the list is NOT empty otherwise false
return !std::list<T>::empty();
}
template <class T>
-bool eSmartPtrList<T>::operator!()
+bool eSmartPtrList<T>::operator!() const
{
// Returns a bool that contains true, when the list is empty otherwise false
return std::list<T>::empty();