Skip to content

Commit 4185c7d

Browse files
committed
fix
Signed-off-by: Martijn Govers <[email protected]>
1 parent d9df47a commit 4185c7d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

power_grid_model_c/power_grid_model/include/power_grid_model/common/iterator_facade.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class IteratorFacade {
4545
return (self <=> other) == std::strong_ordering::equivalent;
4646
}
4747

48-
// NOLINTNEXTLINE(cert-dcl21-cpp) // pre-increment but clang-tidy incorrectly sees this as post-increment
48+
// NOLINTNEXTLINE(cert-dcl21-cpp) // pre-decrement but clang-tidy incorrectly sees this as post-decrement
4949
template <typename Self> constexpr std::add_lvalue_reference_t<Self> operator++(this Self& self) {
5050
if constexpr (requires { self.increment(); }) { // NOTE: IteratorFacade should be a friend class
5151
self.increment();
@@ -64,14 +64,14 @@ class IteratorFacade {
6464
return self;
6565
}
6666
template <typename Self>
67-
constexpr std::add_const_t<std::remove_reference_t<Self>> operator++(this Self& self, std::integral auto /*idx*/) {
67+
constexpr std::remove_cvref_t<Self> operator++(this Self& self, std::integral auto /*idx*/) {
6868
using Result = std::remove_cvref_t<Self>;
6969
Result result{self};
7070
++self;
7171
return result;
7272
}
7373
template <typename Self>
74-
constexpr std::add_const_t<std::remove_reference_t<Self>> operator--(this Self& self, std::integral auto /*idx*/) {
74+
constexpr std::remove_cvref_t<Self> operator--(this Self& self, std::integral auto /*idx*/) {
7575
using Result = std::remove_cvref_t<Self>;
7676
Result result{self};
7777
--self;

0 commit comments

Comments
 (0)