Easy.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_BASE_EASY_H
00013 #define ZYPP_BASE_EASY_H
00014 
00024 #define for_(IT,BEG,END) for ( typeof(BEG) IT = BEG, _for_end = END; IT != _for_end; ++IT )
00025 #define for_each_(IT,CONT) for_( IT, CONT.begin(), CONT.end() )
00026 
00034 #define arrayBegin(A) (&A[0])
00035 #define arraySize(A)  (sizeof(A)/sizeof(*A))
00036 #define arrayEnd(A)   (&A[0] + arraySize(A))
00037 
00038 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100  + __GNUC_PATCHLEVEL__)
00039 #if GCC_VERSION < 40600 || not defined(__GXX_EXPERIMENTAL_CXX0X__)
00040 #define nullptr NULL
00041 #endif
00042 
00044 namespace zypp
00045 { 
00046 
00047 } // namespace zypp
00049 #endif // ZYPP_BASE_EASY_H

doxygen