diff --git a/common/formatting/layout_optimizer_internal.h b/common/formatting/layout_optimizer_internal.h index 08c93dd30..f7969dd84 100644 --- a/common/formatting/layout_optimizer_internal.h +++ b/common/formatting/layout_optimizer_internal.h @@ -369,9 +369,9 @@ class LayoutFunctionIterator { return *this; } - iterator operator++() { return *this += 1; } + iterator& operator++() { return *this += 1; } - iterator operator--() { return *this -= 1; } + iterator& operator--() { return *this -= 1; } iterator operator++(int) { auto tmp = *this;