Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef _INITIALIZER_LIST
00031 #define _INITIALIZER_LIST
00032
00033 #pragma GCC system_header
00034
00035 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00036
00037 #pragma GCC visibility push(default)
00038
00039 #include <cstddef>
00040
00041 namespace std
00042 {
00043
00044 template<class _E>
00045 class initializer_list
00046 {
00047 public:
00048 typedef _E value_type;
00049 typedef const _E& reference;
00050 typedef const _E& const_reference;
00051 typedef size_t size_type;
00052 typedef const _E* iterator;
00053 typedef const _E* const_iterator;
00054
00055 private:
00056 iterator _M_array;
00057 size_type _M_len;
00058
00059
00060 initializer_list(const_iterator __a, size_type __l)
00061 : _M_array(__a), _M_len(__l) { }
00062
00063 public:
00064 initializer_list() : _M_array(NULL), _M_len(0) { }
00065
00066
00067 size_type
00068 size() const { return _M_len; }
00069
00070
00071 const_iterator
00072 begin() const { return _M_array; }
00073
00074
00075 const_iterator
00076 end() const { return begin() + size(); }
00077 };
00078 }
00079
00080 #pragma GCC visibility pop
00081 #endif // C++0x
00082 #endif // _INITIALIZER_LIST