summaryrefslogtreecommitdiffstats
path: root/library/cpp/digest/lower_case/lciter.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <[email protected]>2022-02-10 16:45:17 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:45:17 +0300
commitd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch)
treedd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/digest/lower_case/lciter.h
parent72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff)
Restoring authorship annotation for Anton Samokhvalov <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/digest/lower_case/lciter.h')
-rw-r--r--library/cpp/digest/lower_case/lciter.h68
1 files changed, 34 insertions, 34 deletions
diff --git a/library/cpp/digest/lower_case/lciter.h b/library/cpp/digest/lower_case/lciter.h
index 87f47c7a823..9538e57932c 100644
--- a/library/cpp/digest/lower_case/lciter.h
+++ b/library/cpp/digest/lower_case/lciter.h
@@ -1,42 +1,42 @@
-#pragma once
-
-#include <util/generic/typetraits.h>
-#include <util/string/ascii.h>
-
+#pragma once
+
+#include <util/generic/typetraits.h>
+#include <util/string/ascii.h>
+
#include <iterator>
-
-template <class T>
+
+template <class T>
struct TLowerCaseIterator: public std::iterator<std::input_iterator_tag, T> {
using TNonConst = std::remove_const_t<T>;
-
- inline TLowerCaseIterator(T* c)
- : C(c)
- {
- }
-
+
+ inline TLowerCaseIterator(T* c)
+ : C(c)
+ {
+ }
+
inline TLowerCaseIterator& operator++() noexcept {
- ++C;
-
- return *this;
- }
-
+ ++C;
+
+ return *this;
+ }
+
inline TLowerCaseIterator operator++(int) noexcept {
- return C++;
- }
-
+ return C++;
+ }
+
inline TNonConst operator*() const noexcept {
- return AsciiToLower(*C);
- }
-
- T* C;
-};
-
-template <class T>
+ return AsciiToLower(*C);
+ }
+
+ T* C;
+};
+
+template <class T>
inline bool operator==(const TLowerCaseIterator<T>& l, const TLowerCaseIterator<T>& r) noexcept {
- return l.C == r.C;
-}
-
-template <class T>
+ return l.C == r.C;
+}
+
+template <class T>
inline bool operator!=(const TLowerCaseIterator<T>& l, const TLowerCaseIterator<T>& r) noexcept {
- return !(l == r);
-}
+ return !(l == r);
+}