| 1 | #define COMPRESSED_PAIR_REV 2 |
| 2 | #include <libcxx-simulators-common/compressed_pair.h> |
| 3 | |
| 4 | namespace std { |
| 5 | inline namespace __1 { |
| 6 | template <typename T> struct vector { |
| 7 | T *__begin_; |
| 8 | T *__end_; |
| 9 | _LLDB_COMPRESSED_PAIR(T *, __cap_ = nullptr, void *, __alloc_); |
| 10 | }; |
| 11 | } // namespace __1 |
| 12 | |
| 13 | inline namespace __2 { |
| 14 | template <typename T> struct vector {}; |
| 15 | } // namespace __2 |
| 16 | |
| 17 | inline namespace __3 { |
| 18 | template <typename T> struct vector { |
| 19 | T *__begin_; |
| 20 | T *__end_; |
| 21 | _LLDB_COMPRESSED_PAIR(short *, __cap_ = nullptr, void *, __alloc_); |
| 22 | }; |
| 23 | } // namespace __3 |
| 24 | } // namespace std |
| 25 | |
| 26 | int main() { |
| 27 | int arr[] = {1, 2, 3}; |
| 28 | std::__1::vector<int> v1{.__begin_ = arr, .__end_ = nullptr}; |
| 29 | std::__1::vector<int> v2{.__begin_ = nullptr, .__end_ = arr}; |
| 30 | std::__1::vector<int> v3{.__begin_ = &arr[2], .__end_ = arr}; |
| 31 | std::__2::vector<int> v4; |
| 32 | |
| 33 | char carr[] = {'a'}; |
| 34 | std::__3::vector<char> v5{.__begin_ = carr, .__end_ = carr + 1}; |
| 35 | |
| 36 | return 0; |
| 37 | } |
| 38 | |