1- /* auto-generated on 2023-08-21 14:44:25 -0400. Do not edit! */
1+ /* auto-generated on 2023-08-25 15:25:45 -0400. Do not edit! */
22/* begin file include/ada.h */
33/* *
44 * @file ada.h
@@ -1008,6 +1008,7 @@ ada_really_inline bool bit_at(const uint8_t a[], const uint8_t i) {
10081008#define ADA_CHECKERS_INL_H
10091009
10101010
1011+ #include < algorithm>
10111012#include < string_view>
10121013#include < cstring>
10131014
@@ -1058,7 +1059,7 @@ ada_really_inline constexpr bool begins_with(std::string_view view,
10581059 std::string_view prefix) {
10591060 // in C++20, you have view.begins_with(prefix)
10601061 return view.size () >= prefix.size () &&
1061- (view. substr ( 0 , prefix.size ()) == prefix );
1062+ std::equal (prefix. begin () , prefix.end (), view. begin () );
10621063}
10631064
10641065} // namespace ada::checkers
@@ -1406,6 +1407,25 @@ constexpr ada::scheme::type get_scheme_type(std::string_view scheme) noexcept;
14061407
14071408namespace ada {
14081409
1410+ /* *
1411+ * Type of URL host as an enum.
1412+ */
1413+ enum url_host_type : uint8_t {
1414+ /* *
1415+ * Represents common URLs such as "https://www.google.com"
1416+ */
1417+ DEFAULT = 0 ,
1418+ /* *
1419+ * Represents ipv4 addresses such as "http://127.0.0.1"
1420+ */
1421+ IPV4 = 1 ,
1422+ /* *
1423+ * Represents ipv6 addresses such as
1424+ * "http://[2001:db8:3333:4444:5555:6666:7777:8888]"
1425+ */
1426+ IPV6 = 2 ,
1427+ };
1428+
14091429/* *
14101430 * @brief Base class of URL implementations
14111431 *
@@ -1428,6 +1448,11 @@ struct url_base {
14281448 */
14291449 bool has_opaque_path{false };
14301450
1451+ /* *
1452+ * URL hosts type
1453+ */
1454+ url_host_type host_type = url_host_type::DEFAULT;
1455+
14311456 /* *
14321457 * @private
14331458 */
@@ -6897,14 +6922,14 @@ inline void url_search_params::sort() {
68976922#ifndef ADA_ADA_VERSION_H
68986923#define ADA_ADA_VERSION_H
68996924
6900- #define ADA_VERSION " 2.6.1 "
6925+ #define ADA_VERSION " 2.6.2 "
69016926
69026927namespace ada {
69036928
69046929enum {
69056930 ADA_VERSION_MAJOR = 2 ,
69066931 ADA_VERSION_MINOR = 6 ,
6907- ADA_VERSION_REVISION = 1 ,
6932+ ADA_VERSION_REVISION = 2 ,
69086933};
69096934
69106935} // namespace ada
0 commit comments