Code enhancement: add base class template qualifier

Fixed build failure with "/permissive-" option caused by use of members of dependent base class template without qualifier.
This commit is contained in:
Nikita Kolotov 2019-08-14 23:26:49 +03:00 committed by Don HO
parent 66fc977304
commit d38559b339
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

View File

@ -31,6 +31,9 @@
template <typename C> template <typename C>
class CThreadSafeQueue : protected std::list<C> class CThreadSafeQueue : protected std::list<C>
{ {
protected:
using Base = std::list<C>;
public: public:
CThreadSafeQueue() CThreadSafeQueue()
{ {
@ -51,7 +54,7 @@ public:
{ {
{ {
CComCritSecLock<CComAutoCriticalSection> lock(m_Crit, true); CComCritSecLock<CComAutoCriticalSection> lock(m_Crit, true);
push_back(c); Base::push_back(c);
} }
::SetEvent(m_hEvent); ::SetEvent(m_hEvent);
} }
@ -59,13 +62,13 @@ public:
bool pop(C& c) bool pop(C& c)
{ {
CComCritSecLock<CComAutoCriticalSection> lock( m_Crit, true ); CComCritSecLock<CComAutoCriticalSection> lock( m_Crit, true );
if (empty()) if (Base::empty())
{ {
return false; return false;
} }
c = front(); c = Base::front();
pop_front(); Base::pop_front();
return true; return true;
} }