From Jason Turner

[vector.bool]

Diff to HTML by rtfpessoa

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