@@ -20,13 +20,13 @@ template <typename PointerT> class GenericSubPointerIterator {
20
20
GenericSubPointerIterator (pointer input) : data{input} {}
21
21
22
22
// / Get the current subpointer as a reference
23
- reference operator *() const { return *(this ->data ); }
23
+ auto operator *() const -> reference { return *(this ->data ); }
24
24
25
25
// / Get the current subpointer as a pointer
26
- pointer operator ->() { return this ->data ; }
26
+ auto operator ->() -> pointer { return this ->data ; }
27
27
28
28
// / Advance the iterator to the next subpointer
29
- GenericSubPointerIterator & operator ++() {
29
+ auto operator ++() -> GenericSubPointerIterator & {
30
30
if (this ->data ->empty ()) {
31
31
// Turn the instance into the impossible subpointer iterator
32
32
this ->data = nullptr ;
@@ -37,8 +37,8 @@ template <typename PointerT> class GenericSubPointerIterator {
37
37
return *this ;
38
38
}
39
39
40
- friend bool operator ==(const GenericSubPointerIterator &left,
41
- const GenericSubPointerIterator &right) {
40
+ friend auto operator ==(const GenericSubPointerIterator &left,
41
+ const GenericSubPointerIterator &right) -> bool {
42
42
return (!left.data && !right.data ) ||
43
43
(left.data && right.data && *(left.data ) == *(right.data ));
44
44
};
@@ -54,10 +54,10 @@ template <typename PointerT> class GenericSubPointerWalker {
54
54
using const_iterator = GenericSubPointerIterator<PointerT>;
55
55
GenericSubPointerWalker (PointerT pointer) : data{std::move (pointer)} {}
56
56
57
- const_iterator begin () { return {&this ->data }; }
58
- const_iterator end () { return {nullptr }; }
59
- const_iterator cbegin () { return {&this ->data }; }
60
- const_iterator cend () { return {nullptr }; }
57
+ auto begin () -> const_iterator { return {&this ->data }; }
58
+ auto end () -> const_iterator { return {nullptr }; }
59
+ auto cbegin () -> const_iterator { return {&this ->data }; }
60
+ auto cend () -> const_iterator { return {nullptr }; }
61
61
62
62
private:
63
63
PointerT data;
0 commit comments