Hello,

I have a problem compiling an application (kde4-kupdateapplet) to which
I'm adding some code that uses libzypp. When compiling, I'm getting this
error: http://paste.opensuse.org/36038415

It seems to be related to the for_ definition in libzypp
9.37.10-0.8.1.10 (which is what SLES11-SP3 is using) as:

#define for_(IT,BEG,END) for ( typeof(BEG) IT = BEG, _for_end = END; IT
!= _for_end; ++IT )

I saw that in libzypp 14.32.0, for_ is also defined using auto instead
of typeof, so I tried changing the definition to

#define for_(IT,BEG,END) for ( auto IT = BEG, _for_end = END; IT !=
_for_end; ++IT )

and then I got a different error:

/usr/include/zypp/base/String.h: In function ‘std::string
zypp::str::joinEscaped(_Iterator, _Iterator, char)’:
/usr/include/zypp/base/String.h:661: error: invalid type argument of
‘unary *’
/usr/include/zypp/base/String.h:667: error: invalid type argument of
‘unary *’
/usr/include/zypp/base/String.h:670: error: invalid type argument of
‘unary *’
/usr/include/zypp/base/String.h:672: error: invalid type argument of
‘unary *’

Also, libzypp 9.37.10 compiles fine in SLES11-SP3, so I'm inclined to
thinking that it should compile fine with the original definition and
the problem is a missing compiler flag, preprocessor definition or
#include, but I'm unable to find the cause.

Can anyone tell me what's wrong there?

Thanks!

PS: Please, keep me in CC since I'm not subscribed to this list
-- 
Antonio Larrosa
-- 
To unsubscribe, e-mail: zypp-devel+unsubscr...@opensuse.org
To contact the owner, e-mail: zypp-devel+ow...@opensuse.org

Reply via email to