@@ -50,9 +50,7 @@ inline vector<T, Capacity>::vector(const uint64_t count) noexcept
5050 m_size = std::min (count, Capacity);
5151 for (uint64_t i{0U }; i < m_size; ++i)
5252 {
53- // AXIVION Next Line AutosarC++19_03-A18.5.2 : false positive, it is a placement new
54- // AXIVION Next Line FaultDetection-IndirectAssignmentOverflow : False positive. Size at
55- // location guaranteed by T.
53+ // AXIVION Next Line AutosarC++19_03-A18.5.2, FaultDetection-IndirectAssignmentOverflow : False positive, it is a placement new. Size guaranteed by T.
5654 new (&at (i)) T ();
5755 }
5856}
@@ -87,8 +85,7 @@ inline vector<T, Capacity>& vector<T, Capacity>::operator=(const vector& rhs) no
8785 // copy using copy assignment
8886 for (; i < minSize; ++i)
8987 {
90- // AXIVION Next Line AutosarC++19_03-A5.0.1 : Expands to basic variable assignment.
91- // Evaluation order is inconsequential.
88+ // AXIVION Next Line AutosarC++19_03-A5.0.1 : Expands to basic variable assignment. Evaluation order is inconsequential.
9289 at (i) = rhs.at (i);
9390 }
9491
@@ -118,8 +115,7 @@ inline vector<T, Capacity>& vector<T, Capacity>::operator=(vector&& rhs) noexcep
118115 // move using move assignment
119116 for (; i < minSize; ++i)
120117 {
121- // AXIVION Next Line AutosarC++19_03-A5.0.1 : Expands to basic variable assignment.
122- // Evaluation order is inconsequential.
118+ // AXIVION Next Line AutosarC++19_03-A5.0.1 : Expands to basic variable assignment. Evaluation order is inconsequential.
123119 at (i) = std::move (rhs.at (i));
124120 }
125121
@@ -168,9 +164,7 @@ inline bool vector<T, Capacity>::emplace_back(Targs&&... args) noexcept
168164{
169165 if (m_size < Capacity)
170166 {
171- // AXIVION Next Construct FaultDetection-IndirectAssignmentOverflow : False positive. Size at
172- // location guaranteed by T
173- // AXIVION Next Construct AutosarC++19_03-A5.0.1 : Evaluation order is inconsequential.
167+ // AXIVION Next Line AutosarC++19_03-A5.0.1, FaultDetection-IndirectAssignmentOverflow: Size guaranteed by T. Evaluation order is inconsequential.
174168 new (&at (m_size++)) T (std::forward<Targs>(args)...);
175169 return true ;
176170 }
@@ -181,7 +175,7 @@ template <typename T, uint64_t Capacity>
181175template <typename ... Targs>
182176inline bool vector<T, Capacity>::emplace(const uint64_t position, Targs&&... args) noexcept
183177{
184- const uint64_t sizeBeforeEmplace = m_size;
178+ const uint64_t sizeBeforeEmplace{ m_size} ;
185179 if ((m_size >= Capacity) || ((position >= Capacity) || (position > sizeBeforeEmplace)))
186180 {
187181 return false ;
@@ -347,7 +341,7 @@ inline typename vector<T, Capacity>::iterator vector<T, Capacity>::end() noexcep
347341template <typename T, uint64_t Capacity>
348342inline typename vector<T, Capacity>::const_iterator vector<T, Capacity>::end() const noexcept
349343{
350- // AXIVION Next Construct AutosarC++19_03-A5.2.4 : Type-safety ensured by template parameter
344+ // AXIVION Next Construct AutosarC++19_03-A5.2.4, AutosarC++19_03-A5.0.4, AutosarC++19_03-M5.0.15 : Type-safety ensured by template parameter.
351345 // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
352346 return reinterpret_cast <const_iterator>(&(at_unchecked (0 )) + m_size);
353347}
@@ -362,8 +356,7 @@ inline bool vector<T, Capacity>::erase(iterator position) noexcept
362356 size_t n{index};
363357 while ((n + 1U ) < size ())
364358 {
365- // AXIVION Next Line AutosarC++19_03-A5.0.1 : Expands to basic variable assignment.
366- // Evaluation order is inconsequential.
359+ // AXIVION Next Line AutosarC++19_03-A5.0.1 : Expands to basic variable assignment. Evaluation order is inconsequential.
367360 at (n) = std::move (at (n + 1U ));
368361 ++n;
369362 }
0 commit comments