From Jason Turner

[vector.bool.pspc]

Diff to HTML by rtfpessoa

tmp/tmpk25dx432/{from.md → to.md} RENAMED
@@ -21,13 +21,10 @@ namespace std {
21
  using reverse_iterator = std::reverse_iterator<iterator>;
22
  using const_reverse_iterator = std::reverse_iterator<const_iterator>;
23
 
24
  // bit reference
25
  class reference {
26
- friend class vector;
27
- constexpr reference() noexcept;
28
-
29
  public:
30
  constexpr reference(const reference&) = default;
31
  constexpr ~reference();
32
  constexpr operator bool() const noexcept;
33
  constexpr reference& operator=(bool x) noexcept;
@@ -78,23 +75,23 @@ namespace std {
78
  constexpr const_iterator cend() const noexcept;
79
  constexpr const_reverse_iterator crbegin() const noexcept;
80
  constexpr const_reverse_iterator crend() const noexcept;
81
 
82
  // capacity
83
- [[nodiscard]] constexpr bool empty() const noexcept;
84
  constexpr size_type size() const noexcept;
85
  constexpr size_type max_size() const noexcept;
86
  constexpr size_type capacity() const noexcept;
87
  constexpr void resize(size_type sz, bool c = false);
88
  constexpr void reserve(size_type n);
89
  constexpr void shrink_to_fit();
90
 
91
  // element access
92
  constexpr reference operator[](size_type n);
93
  constexpr const_reference operator[](size_type n) const;
94
- constexpr const_reference at(size_type n) const;
95
  constexpr reference at(size_type n);
 
96
  constexpr reference front();
97
  constexpr const_reference front() const;
98
  constexpr reference back();
99
  constexpr const_reference back() const;
100
 
@@ -125,11 +122,11 @@ namespace std {
125
  };
126
  }
127
  ```
128
 
129
  Unless described below, all operations have the same requirements and
130
- semantics as the primary `vector` template, except that operations
131
  dealing with the `bool` value type map to bit values in the container
132
  storage and `allocator_traits::construct` [[allocator.traits.members]]
133
  is not used to construct these values.
134
 
135
  There is no requirement that the data be stored as a contiguous
 
21
  using reverse_iterator = std::reverse_iterator<iterator>;
22
  using const_reverse_iterator = std::reverse_iterator<const_iterator>;
23
 
24
  // bit reference
25
  class reference {
 
 
 
26
  public:
27
  constexpr reference(const reference&) = default;
28
  constexpr ~reference();
29
  constexpr operator bool() const noexcept;
30
  constexpr reference& operator=(bool x) noexcept;
 
75
  constexpr const_iterator cend() const noexcept;
76
  constexpr const_reverse_iterator crbegin() const noexcept;
77
  constexpr const_reverse_iterator crend() const noexcept;
78
 
79
  // capacity
80
+ constexpr bool empty() const noexcept;
81
  constexpr size_type size() const noexcept;
82
  constexpr size_type max_size() const noexcept;
83
  constexpr size_type capacity() const noexcept;
84
  constexpr void resize(size_type sz, bool c = false);
85
  constexpr void reserve(size_type n);
86
  constexpr void shrink_to_fit();
87
 
88
  // element access
89
  constexpr reference operator[](size_type n);
90
  constexpr const_reference operator[](size_type n) const;
 
91
  constexpr reference at(size_type n);
92
+ constexpr const_reference at(size_type n) const;
93
  constexpr reference front();
94
  constexpr const_reference front() const;
95
  constexpr reference back();
96
  constexpr const_reference back() const;
97
 
 
122
  };
123
  }
124
  ```
125
 
126
  Unless described below, all operations have the same requirements and
127
+ semantics as the `vector` primary template, except that operations
128
  dealing with the `bool` value type map to bit values in the container
129
  storage and `allocator_traits::construct` [[allocator.traits.members]]
130
  is not used to construct these values.
131
 
132
  There is no requirement that the data be stored as a contiguous