| 1 | #ifndef _INITIALIZER_LIST |
| 2 | #define _INITIALIZER_LIST |
| 3 | |
| 4 | #pragma clang system_header |
| 5 | # |
| 6 | #include "sim_c++config.h" // size_t |
| 7 | |
| 8 | namespace std { |
| 9 | |
| 10 | template <class _E> |
| 11 | class initializer_list { |
| 12 | const _E* __begin_; |
| 13 | size_t __size_; |
| 14 | |
| 15 | initializer_list(const _E* __b, size_t __s) |
| 16 | : __begin_(__b), |
| 17 | __size_(__s) |
| 18 | {} |
| 19 | |
| 20 | public: |
| 21 | typedef _E value_type; |
| 22 | typedef const _E& reference; |
| 23 | typedef const _E& const_reference; |
| 24 | typedef size_t size_type; |
| 25 | |
| 26 | typedef const _E* iterator; |
| 27 | typedef const _E* const_iterator; |
| 28 | |
| 29 | initializer_list() : __begin_(0), __size_(0) {} |
| 30 | |
| 31 | size_t size() const {return __size_;} |
| 32 | const _E* begin() const {return __begin_;} |
| 33 | const _E* end() const {return __begin_ + __size_;} |
| 34 | |
| 35 | }; // class initializer_list |
| 36 | |
| 37 | } // namespace std |
| 38 | |
| 39 | #endif // _INITIALIZER_LIST |
| 40 | |