@@ -54,10 +54,10 @@ class url_parse_error : public std::runtime_error {
5454// /
5555// / For example:
5656// / ```
57- // / auto url = skyr::make_url ("http://example.org/");
58- // / assert("http:" == url.value(). scheme());
59- // / assert("example.org" == url.value(). hostname());
60- // / assert("/" == url.value(). pathname());
57+ // / auto url = skyr::url ("http://example.org/");
58+ // / assert("http:" == url.scheme());
59+ // / assert("example.org" == url.hostname());
60+ // / assert("/" == url.pathname());
6161// / ```
6262class url {
6363
@@ -83,7 +83,7 @@ class url {
8383 // / Constructs an empty `url` object
8484 // /
8585 // / \post `empty() == true`
86- url ();
86+ url () : url_(), href_(), view_(href_), parameters_( this ) {}
8787
8888 // / Parses a URL from the input string. The input string can be
8989 // / any unicode encoded string (UTF-8, UTF-16 or UTF-32).
@@ -131,19 +131,19 @@ class url {
131131 // / Constructs a URL from an existing record
132132 // /
133133 // / \param input A URL record
134- explicit url (url_record &&input);
134+ explicit url (url_record &&input)
135+ : url() {
136+ update_record (std::forward<url_record>(input));
137+ }
135138
136139 // /
137140 // / \param other
138141 url (const url &other)
139- : url() {
140- auto other_url = other.url_ ;
141- update_record (std::move (other_url));
142- }
142+ : url(url_record(other.url_)) {}
143143
144144 // /
145145 // / \param other
146- url (url &&other)
146+ url (url &&other) noexcept
147147 : url(std::move(other.url_)) {}
148148
149149 // / Swaps this `url` object with another
0 commit comments