File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -11,19 +11,28 @@ namespace std {
11
11
12
12
template <class _Ep >
13
13
class initializer_list {
14
- const _Ep __begin;
15
- size_t __size;
14
+ public:
15
+ using value_type = _Ep;
16
+ using reference = _Ep&;
17
+ using const_reference = _Ep const &;
18
+ using size_type = size_t ;
19
+ using iterator = const _Ep*;
20
+ using const_iterator = const _Ep*;
21
+
22
+ private:
23
+ iterator __begin;
24
+ size_type __size;
16
25
17
- _EZCXX_INLINE initializer_list (const _Ep* __begin, size_t __size) noexcept : __begin(__begin), __size(__size) {}
26
+ _EZCXX_INLINE constexpr initializer_list (const_iterator __begin, size_type __size) noexcept : __begin(__begin), __size(__size) {}
18
27
19
28
public:
20
- _EZCXX_INLINE initializer_list () noexcept : initializer_list(nullptr , 0 ) {}
29
+ _EZCXX_INLINE constexpr initializer_list () noexcept : initializer_list(nullptr , 0 ) {}
21
30
22
- _EZCXX_INLINE size_t size () const noexcept { return __size; }
31
+ _EZCXX_INLINE constexpr size_type size () const noexcept { return __size; }
23
32
24
- _EZCXX_INLINE const _Ep* begin () const noexcept { return __begin; }
33
+ _EZCXX_INLINE constexpr const_iterator begin () const noexcept { return __begin; }
25
34
26
- _EZCXX_INLINE const _Ep* end () const noexcept { return __begin + __size; }
35
+ _EZCXX_INLINE constexpr const_iterator end () const noexcept { return __begin + __size; }
27
36
};
28
37
29
38
template <class _Ep >
You can’t perform that action at this time.
0 commit comments