Fix for_ macro
authorMichael Andres <ma@suse.de>
Tue, 11 Oct 2011 12:43:20 +0000 (14:43 +0200)
committerMichael Andres <ma@suse.de>
Tue, 11 Oct 2011 12:43:20 +0000 (14:43 +0200)
zypp/base/Easy.h

index e1809a3a15b54932336337334d7a13f4011cd494..5e4067c3efd399e241ef6d455f434ecc80b6b7dc 100644 (file)
  *  }
  * \endcode
 */
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#define for_(IT,BEG,END) for ( typeof(BEG) IT = BEG, _for_end = END; IT != _for_end; ++IT )
+#else
 #define for_(IT,BEG,END) for ( auto IT = BEG, _for_end = END; IT != _for_end; ++IT )
+#endif
 #define for_each_(IT,CONT) for_( IT, CONT.begin(), CONT.end() )
 
 /** Simple C-array iterator