@@ -27,7 +27,7 @@ using namespace std::string_literals;
2727using namespace std ::string_view_literals;
2828
2929namespace details {
30- inline auto contains (std::string_view view, char element) noexcept {
30+ constexpr inline auto contains (std::string_view view, char element) noexcept {
3131 auto first = std::cbegin (view), last = std::cend (view);
3232 return last != std::find (first, last, element);
3333}
@@ -38,7 +38,7 @@ inline auto port_number(std::string_view port) noexcept -> tl::expected<std::uin
3838 }
3939
4040 const char *port_first = port.data ();
41- char *port_last = nullptr ;
41+ char *port_last = nullptr ; // NOLINT
4242 auto port_value = std::strtoul (port_first, &port_last, 10 );
4343
4444 if (port_first == port_last) {
@@ -55,7 +55,7 @@ inline auto is_url_code_point(char byte) noexcept {
5555 return std::isalnum (byte, std::locale::classic ()) || contains (" !$&'()*+,-./:;=?@_~" sv, byte);
5656}
5757
58- inline auto is_windows_drive_letter (std::string_view segment) noexcept {
58+ constexpr inline auto is_windows_drive_letter (std::string_view segment) noexcept {
5959 if (segment.size () < 2 ) {
6060 return false ;
6161 }
@@ -73,11 +73,11 @@ inline auto is_windows_drive_letter(std::string_view segment) noexcept {
7373 return result;
7474}
7575
76- inline auto is_single_dot_path_segment (std::string_view segment) noexcept {
76+ constexpr inline auto is_single_dot_path_segment (std::string_view segment) noexcept {
7777 return (segment == " ." ) || (segment == " %2e" ) || (segment == " %2E" );
7878}
7979
80- inline auto is_double_dot_path_segment (std::string_view segment) noexcept {
80+ constexpr inline auto is_double_dot_path_segment (std::string_view segment) noexcept {
8181 return (segment == " .." ) || (segment == " %2e." ) || (segment == " .%2e" ) || (segment == " %2e%2e" ) ||
8282 (segment == " %2E." ) || (segment == " .%2E" ) || (segment == " %2E%2E" ) || (segment == " %2E%2e" ) ||
8383 (segment == " %2e%2E" );
0 commit comments