xref: /llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/smart-ptr/initializer_list.h (revision 89a1d03e2b379e325daa5249411e414bbd995b5e)
1 namespace std {
2 typedef decltype(sizeof(int)) size_t;
3 
4 template <class _E> class initializer_list {
5   const _E *__begin_;
6   size_t __size_;
7 
initializer_list(const _E * __b,size_t __s)8   initializer_list(const _E *__b, size_t __s) : __begin_(__b), __size_(__s) {}
9 
10 public:
11   typedef _E value_type;
12   typedef const _E &reference;
13   typedef const _E &const_reference;
14   typedef size_t size_type;
15 
16   typedef const _E *iterator;
17   typedef const _E *const_iterator;
18 
initializer_list()19   initializer_list() : __begin_(nullptr), __size_(0) {}
20 
size()21   size_t size() const { return __size_; }
begin()22   const _E *begin() const { return __begin_; }
end()23   const _E *end() const { return __begin_ + __size_; }
24 };
25 
26 template <class _E>
27 class vector {
28  public:
29   vector(initializer_list<_E> init);
30   ~vector();
31 };
32 } // namespace std
33