| 1 | |
| 2 | #ifndef _SIM_SET |
| 3 | #define _SIM_SET |
| 4 | |
| 5 | #pragma clang system_header |
| 6 | #include "sim_initializer_list" |
| 7 | |
| 8 | namespace std { |
| 9 | |
| 10 | template< class T = void > |
| 11 | struct less; |
| 12 | |
| 13 | template< class T > |
| 14 | struct allocator; |
| 15 | |
| 16 | template< class Key > |
| 17 | struct hash; |
| 18 | |
| 19 | template< |
| 20 | class Key, |
| 21 | class Compare = std::less<Key>, |
| 22 | class Alloc = std::allocator<Key> |
| 23 | > class set { |
| 24 | public: |
| 25 | set(initializer_list<Key> __list) {} |
| 26 | |
| 27 | class iterator { |
| 28 | public: |
| 29 | iterator(Key *key): ptr(key) {} |
| 30 | iterator& operator++() { ++ptr; return *this; } |
| 31 | bool operator!=(const iterator &other) const { return ptr != other.ptr; } |
| 32 | const Key &operator*() const { return *ptr; } |
| 33 | private: |
| 34 | Key *ptr; |
| 35 | }; |
| 36 | |
| 37 | Key *val; |
| 38 | iterator begin() const { return iterator(val); } |
| 39 | iterator end() const { return iterator(val + 1); } |
| 40 | }; |
| 41 | |
| 42 | } // namespace std |
| 43 | |
| 44 | #endif // _SIM_SET |
| 45 | |