kdevplatform compile error
Ralf Habacker
ralf.habacker at freenet.de
Wed Sep 10 15:09:49 CEST 2008
Andreas Pakulat schrieb:
> On 10.09.08 11:39:19, Ralf Habacker wrote:
>
>> Hi,
>>
>> while trying to compile kdevplatform I recognized a compile error
>>
>> c:\downloads\kdesvn\trunk\kde\kdevplatform\language\duchain\ducontextdata.h(170)
>> : error C2248: 'KDevelop::DUContext::d_func' : cannot access private
>> member declared in class 'KDevelop::DUContext'
>>
>> c:\downloads\kdesvn\trunk\kde\kdevplatform\language\duchain\ducontext.h(721)
>> : see declaration of 'KDevelop::DUContext::d_func'
>>
>> c:\downloads\kdesvn\trunk\kde\kdevplatform\language\duchain\ducontext.h(156)
>> : see declaration of 'KDevelop::DUContext'
>> c:\downloads\kdesvn\trunk\kde\kdevplatform\language\duchain\ducontextdata.h(215)
>> : error C2248: 'KDevelop::DUContext::m_dynamicData' : cannot access
>> private member declared in class 'KDevelop::DUContext'
>>
>> c:\downloads\kdesvn\trunk\kde\kdevplatform\language\duchain\ducontext.h(722)
>> : see declaration of 'KDevelop::DUContext::m_dynamicDat
>>
>
> DUContextData is a friend class of DUContext, so according to C++
> there's no reason it cannot access the private members of DUContext.
>
The problem must come from somewhere else - I took a look on the
preprocessed code - see line 170 listed below
struct VisibleDeclarationIterator {
VisibleDeclarationIterator(DUContextDynamicData* data) {
currentPos.append(0);
currentData.append(data);
toValidPosition();
}
Declaration* operator*() const {
line 170 return
currentData.back()->m_context->d_func()->m_localDeclarations()[currentPos.back()].data(currentData.back()->m_topContext);
}
currentData.back() is of type DUContextDynamicData* and m_context is
DUContext*
> Which compiler are you using?
>
MS Visual Studio C++ 2005 Express Edition
Ralf
More information about the Kde-windows
mailing list