diff --git a/examples/readme_examples.cpp b/examples/readme_examples.cpp index db891e3..3685896 100644 --- a/examples/readme_examples.cpp +++ b/examples/readme_examples.cpp @@ -42,7 +42,7 @@ bool windows_path() { std::vector path_as_ints = {U'C', U':', U'\x00010000'}; std::filesystem::path path = path_as_ints | as_char32_t | std::ranges::to(); - auto const& native_path = path.native(); + const auto& native_path = path.native(); if (native_path != std::wstring{L'C', L':', L'\xD800', L'\xDC00'}) { return false; } diff --git a/include/beman/utf_view/to_utf_view.hpp b/include/beman/utf_view/to_utf_view.hpp index 89bffa4..ce7c5fe 100644 --- a/include/beman/utf_view/to_utf_view.hpp +++ b/include/beman/utf_view/to_utf_view.hpp @@ -273,7 +273,7 @@ struct exposition_only_to_utf_view_impl::exposition_only_ite } - constexpr std::ranges::iterator_t const& base() const& noexcept { + constexpr const std::ranges::iterator_t& base() const& noexcept { return current_; } @@ -342,8 +342,8 @@ struct exposition_only_to_utf_view_impl::exposition_only_ite return retval; } - friend constexpr bool operator==(exposition_only_iterator const& lhs, - exposition_only_iterator const& rhs) + friend constexpr bool operator==(const exposition_only_iterator& lhs, + const exposition_only_iterator& rhs) requires std::equality_comparable> { if constexpr (std::ranges::forward_range) { diff --git a/paper/P2728.md b/paper/P2728.md index c97b383..04de8b6 100644 --- a/paper/P2728.md +++ b/paper/P2728.md @@ -706,7 +706,7 @@ public: @*read*@(); } - constexpr iterator_t<@*Base*@> const& base() const& noexcept { return current_; } + constexpr const iterator_t<@*Base*@>& base() const& noexcept { return current_; } constexpr iterator_t<@*Base*@> base() && { return std::move(current_); } @@ -756,7 +756,7 @@ public: return retval; } - friend constexpr bool operator==(@*iterator*@ const& lhs, @*iterator*@ const& rhs) requires equality_comparable> + friend constexpr bool operator==(const @*iterator*@& lhs, const @*iterator*@& rhs) requires equality_comparable> { if constexpr (forward_range<@*Base*@>) { return lhs.base() == rhs.base() && lhs.buf_index_ == rhs.buf_index_; @@ -1227,7 +1227,7 @@ expression `as_charN_t(E)` is expression-equivalent to: ```c++ std::vector path_as_ints = {U'C', U':', U'\x00010000'}; std::filesystem::path path = path_as_ints | as_char32_t | std::ranges::to(); -auto const& native_path = path.native(); +const auto& native_path = path.native(); if (native_path != std::wstring{L'C', L':', L'\xD800', L'\xDC00'}) { return false; }