@@ -57,39 +57,31 @@ class any_view : public std::ranges::view_interface<any_view<ElementT, OptionsV,
5757
5858 public:
5959 template <detail::viewable_range_compatible_with<any_view> RangeT>
60- any_view (RangeT&&);
61-
62- any_view (const any_view&)
63- requires (not copyable)
64- = delete ;
60+ constexpr any_view (RangeT&&);
6561
6662 constexpr any_view (const any_view&)
6763 requires copyable
6864 = default;
6965
7066 constexpr any_view (any_view&&) noexcept = default;
7167
72- auto operator =(const any_view&) -> any_view&
73- requires (not copyable)
74- = delete ;
75-
7668 constexpr auto operator =(const any_view&) -> any_view&
7769 requires copyable
7870 = default ;
7971
8072 constexpr auto operator =(any_view&&) noexcept -> any_view& = default ;
8173
82- auto begin () -> iterator
74+ [[nodiscard]] constexpr auto begin () -> iterator
8375 requires(not simple);
84- auto end () -> sentinel
76+ [[nodiscard]] constexpr auto end () -> sentinel
8577 requires(not simple);
8678
87- auto begin () const -> iterator
79+ [[nodiscard]] constexpr auto begin () const -> iterator
8880 requires simple;
89- auto end () const -> sentinel
81+ [[nodiscard]] constexpr auto end () const -> sentinel
9082 requires simple;
9183
92- auto size () const -> size_type
84+ [[nodiscard]] constexpr auto size () const -> size_type
9385 requires sized;
9486};
9587
@@ -117,7 +109,7 @@ class any_view : public std::ranges::view_interface<any_view<ElementT, RangeTrai
117109
118110 public:
119111 template <detail::viewable_range_compatible_with<any_view> RangeT>
120- any_view (RangeT&&);
112+ constexpr any_view (RangeT&&);
121113
122114 constexpr any_view (const any_view&)
123115 requires copyable
@@ -131,17 +123,17 @@ class any_view : public std::ranges::view_interface<any_view<ElementT, RangeTrai
131123
132124 constexpr auto operator =(any_view&&) noexcept -> any_view& = default ;
133125
134- auto begin () -> iterator
126+ [[nodiscard]] constexpr auto begin () -> iterator
135127 requires(not simple);
136- auto end () -> sentinel
128+ [[nodiscard]] constexpr auto end () -> sentinel
137129 requires(not simple);
138130
139- auto begin () const -> iterator
131+ [[nodiscard]] constexpr auto begin () const -> iterator
140132 requires simple;
141- auto end () const -> sentinel
133+ [[nodiscard]] constexpr auto end () const -> sentinel
142134 requires simple;
143135
144- auto size () const -> size_type
136+ [[nodiscard]] constexpr auto size () const -> size_type
145137 requires sized;
146138};
147139
@@ -168,7 +160,7 @@ class any_view : public std::ranges::view_interface<any_view<ElementT, OptionsV>
168160
169161 public:
170162 template <detail::viewable_range_compatible_with<any_view> RangeT>
171- any_view (RangeT&&);
163+ constexpr any_view (RangeT&&);
172164
173165 constexpr any_view (const any_view&)
174166 requires copyable
@@ -182,17 +174,17 @@ class any_view : public std::ranges::view_interface<any_view<ElementT, OptionsV>
182174
183175 constexpr auto operator =(any_view&&) noexcept -> any_view& = default ;
184176
185- auto begin () -> iterator
177+ [[nodiscard]] constexpr auto begin () -> iterator
186178 requires(not simple);
187- auto end () -> sentinel
179+ [[nodiscard]] constexpr auto end () -> sentinel
188180 requires(not simple);
189181
190- auto begin () const -> iterator
182+ [[nodiscard]] constexpr auto begin () const -> iterator
191183 requires simple;
192- auto end () const -> sentinel
184+ [[nodiscard]] constexpr auto end () const -> sentinel
193185 requires simple;
194186
195- auto size () const -> size_type
187+ [[nodiscard]] constexpr auto size () const -> size_type
196188 requires sized;
197189};
198190
0 commit comments