|
14 | 14 |
|
15 | 15 | #include <boost/http_proto/detail/config.hpp> |
16 | 16 | #include <boost/http_proto/fields_base.hpp> |
17 | | -#include <boost/http_proto/fields_view.hpp> |
18 | 17 | #include <boost/core/detail/string_view.hpp> |
19 | 18 |
|
20 | 19 | namespace boost { |
@@ -196,28 +195,6 @@ class fields final |
196 | 195 | BOOST_HTTP_PROTO_DECL |
197 | 196 | fields(fields const& f); |
198 | 197 |
|
199 | | - /** Constructor. |
200 | | -
|
201 | | - The newly constructed object contains |
202 | | - a copy of `f`. |
203 | | -
|
204 | | - @par Postconditions |
205 | | - @code |
206 | | - this->buffer() == f.buffer() && this->buffer().data() != f.buffer().data() |
207 | | - @endcode |
208 | | -
|
209 | | - @par Complexity |
210 | | - Linear in `f.size()`. |
211 | | -
|
212 | | - @par Exception Safety |
213 | | - Strong guarantee. |
214 | | - Calls to allocate may throw. |
215 | | -
|
216 | | - @param f The fields to copy. |
217 | | - */ |
218 | | - BOOST_HTTP_PROTO_DECL |
219 | | - fields(fields_view const& f); |
220 | | - |
221 | 198 | /** Assignment. |
222 | 199 |
|
223 | 200 | The contents of `f` are transferred to |
@@ -272,55 +249,10 @@ class fields final |
272 | 249 | fields& |
273 | 250 | operator=(fields const& f) noexcept |
274 | 251 | { |
275 | | - copy_impl(*f.ph_); |
276 | | - return *this; |
277 | | - } |
278 | | - |
279 | | - /** Assignment. |
280 | | -
|
281 | | - The contents of `f` are copied and |
282 | | - the previous contents of `this` are |
283 | | - discarded. |
284 | | -
|
285 | | - @par Postconditions |
286 | | - @code |
287 | | - this->buffer() == f.buffer() && this->buffer().data() != f.buffer().data() |
288 | | - @endcode |
289 | | -
|
290 | | - @par Complexity |
291 | | - Linear in `r.size()`. |
292 | | -
|
293 | | - @par Exception Safety |
294 | | - Strong guarantee. |
295 | | - Calls to allocate may throw. |
296 | | - Exception thrown if max capacity exceeded. |
297 | | -
|
298 | | - @throw std::length_error |
299 | | - Max capacity would be exceeded. |
300 | | -
|
301 | | - @return A reference to this object. |
302 | | -
|
303 | | - @param f The fields to copy. |
304 | | - */ |
305 | | - fields& |
306 | | - operator=(fields_view const& f) |
307 | | - { |
308 | | - copy_impl(*f.ph_); |
| 252 | + copy_impl(f.h_); |
309 | 253 | return *this; |
310 | 254 | } |
311 | 255 |
|
312 | | - /** Conversion. |
313 | | -
|
314 | | - @see |
315 | | - @ref fields_view. |
316 | | -
|
317 | | - @return A view of the fields. |
318 | | - */ |
319 | | - operator fields_view() const noexcept |
320 | | - { |
321 | | - return fields_view(ph_); |
322 | | - } |
323 | | - |
324 | 256 | //-------------------------------------------- |
325 | 257 |
|
326 | 258 | /** Swap. |
|
0 commit comments