@@ -166,13 +166,13 @@ void uri::initialize(optional<string_type> scheme,
166166 }
167167}
168168
169- uri::uri () : uri_view_(uri_), uri_parts_() {}
169+ uri::uri () : uri_view_(uri_) {}
170170
171- uri::uri (const uri &other) : uri_(other.uri_), uri_view_(uri_), uri_parts_() {
171+ uri::uri (const uri &other) : uri_(other.uri_), uri_view_(uri_) {
172172 detail::advance_parts (uri_view_, uri_parts_, other.uri_parts_ );
173173}
174174
175- uri::uri (const uri_builder &builder) : uri_parts_() {
175+ uri::uri (const uri_builder &builder) {
176176 initialize (builder.scheme_ , builder.user_info_ , builder.host_ , builder.port_ ,
177177 builder.path_ , builder.query_ , builder.fragment_ );
178178}
@@ -194,11 +194,12 @@ uri &uri::operator=(uri other) {
194194}
195195
196196void uri::swap (uri &other) noexcept {
197- auto parts = uri_parts_;
198- advance_parts (other.uri_view_ , uri_parts_, other.uri_parts_ );
199197 uri_.swap (other.uri_ );
200198 uri_view_.swap (other.uri_view_ );
201- advance_parts (other.uri_view_ , other.uri_parts_ , parts);
199+
200+ const auto this_parts = uri_parts_;
201+ detail::advance_parts (uri_view_, uri_parts_, other.uri_parts_ );
202+ detail::advance_parts (other.uri_view_ , other.uri_parts_ , this_parts);
202203}
203204
204205uri::const_iterator uri::begin () const noexcept { return uri_view_.begin (); }
0 commit comments