@@ -149,7 +149,7 @@ struct url : url_base {
149149 * @return a newly allocated string.
150150 * @see https://url.spec.whatwg.org/#dom-url-pathname
151151 */
152- [[nodiscard]] std::string_view get_pathname () const noexcept ;
152+ [[nodiscard]] constexpr std::string_view get_pathname () const noexcept ;
153153
154154 /* *
155155 * Compute the pathname length in bytes without instantiating a view or a
@@ -283,9 +283,9 @@ struct url : url_base {
283283 [[nodiscard]] ada_really_inline ada::url_components get_components ()
284284 const noexcept ;
285285 /* * @return true if the URL has a hash component */
286- [[nodiscard]] inline bool has_hash () const noexcept override ;
286+ [[nodiscard]] constexpr bool has_hash () const noexcept override ;
287287 /* * @return true if the URL has a search component */
288- [[nodiscard]] inline bool has_search () const noexcept override ;
288+ [[nodiscard]] constexpr bool has_search () const noexcept override ;
289289
290290 private:
291291 friend ada::url ada::parser::parse_url<ada::url>(std::string_view,
@@ -361,12 +361,6 @@ struct url : url_base {
361361 return this ->parse_port (view, false );
362362 }
363363
364- /* *
365- * Take the scheme from another URL. The scheme string is copied from the
366- * provided url.
367- */
368- inline void copy_scheme (const ada::url &u);
369-
370364 /* *
371365 * Parse the host from the provided input. We assume that
372366 * the input does not contain spaces or tabs. Control
@@ -380,9 +374,9 @@ struct url : url_base {
380374 template <bool has_state_override = false >
381375 [[nodiscard]] ada_really_inline bool parse_scheme (std::string_view input);
382376
383- inline void clear_pathname () override ;
384- inline void clear_search () override ;
385- inline void set_protocol_as_file ();
377+ constexpr void clear_pathname () override ;
378+ constexpr void clear_search () override ;
379+ constexpr void set_protocol_as_file ();
386380
387381 /* *
388382 * Parse the path from the provided input.
@@ -407,7 +401,13 @@ struct url : url_base {
407401 * Take the scheme from another URL. The scheme string is moved from the
408402 * provided url.
409403 */
410- inline void copy_scheme (ada::url &&u) noexcept ;
404+ constexpr void copy_scheme (ada::url &&u) noexcept ;
405+
406+ /* *
407+ * Take the scheme from another URL. The scheme string is copied from the
408+ * provided url.
409+ */
410+ constexpr void copy_scheme (const ada::url &u);
411411
412412}; // struct url
413413
0 commit comments