Ada 2.9.2
Fast spec-compliant URL parser
Loading...
Searching...
No Matches
ada.h File Reference

Includes all definitions for Ada. More...

#include <string>
#include <string_view>
#include <cstdint>
#include <algorithm>
#include <cstring>
#include <iostream>
#include <optional>
#include <array>
#include <exception>
#include <functional>
#include <type_traits>
#include <utility>
#include <charconv>
#include <vector>

Go to the source code of this file.

Classes

struct  ada::url_components
 URL Component representations using offsets. More...
 
struct  ada::url_base
 Base class of URL implementations. More...
 
class  tl::monostate
 
struct  tl::in_place_t
 
class  tl::unexpected< E >
 
struct  tl::unexpect_t
 
struct  tl::detail::conjunction<... >
 
struct  tl::detail::conjunction< B >
 
struct  tl::detail::conjunction< B, Bs... >
 
struct  tl::detail::invoke_result_impl< F, decltype(detail::invoke(std::declval< F >(), std::declval< Us >()...), void()), Us... >
 
struct  tl::detail::swap_adl_tests::tag
 
struct  tl::detail::swap_adl_tests::is_std_swap_noexcept< T >
 
struct  tl::detail::swap_adl_tests::is_std_swap_noexcept< T[N]>
 
struct  tl::detail::swap_adl_tests::is_adl_swap_noexcept< T, U >
 
struct  tl::detail::is_swappable< T, U >
 
struct  tl::detail::is_swappable< T[N], T[N]>
 
struct  tl::detail::is_nothrow_swappable< T, U >
 
struct  tl::detail::is_expected_impl< T >
 
struct  tl::detail::is_expected_impl< expected< T, E > >
 
struct  tl::detail::no_init_t
 
struct  tl::detail::expected_storage_base< T, E, bool, bool >
 
struct  tl::detail::expected_storage_base< T, E, true, true >
 
struct  tl::detail::expected_storage_base< T, E, true, false >
 
struct  tl::detail::expected_storage_base< T, E, false, true >
 
struct  tl::detail::expected_storage_base< void, E, false, true >
 
struct  tl::detail::expected_storage_base< void, E, false, true >::dummy
 
struct  tl::detail::expected_storage_base< void, E, false, false >
 
struct  tl::detail::expected_operations_base< T, E >
 
struct  tl::detail::expected_operations_base< void, E >
 
struct  tl::detail::expected_copy_base< T, E, bool >
 
struct  tl::detail::expected_copy_base< T, E, false >
 
struct  tl::detail::expected_move_base< T, E, bool >
 
struct  tl::detail::expected_move_base< T, E, false >
 
struct  tl::detail::expected_copy_assign_base< T, E, bool >
 
struct  tl::detail::expected_copy_assign_base< T, E, false >
 
struct  tl::detail::expected_move_assign_base< T, E, bool >
 
struct  tl::detail::expected_move_assign_base< T, E, false >
 
struct  tl::detail::expected_delete_ctor_base< T, E, EnableCopy, EnableMove >
 
struct  tl::detail::expected_delete_ctor_base< T, E, true, false >
 
struct  tl::detail::expected_delete_ctor_base< T, E, false, true >
 
struct  tl::detail::expected_delete_ctor_base< T, E, false, false >
 
struct  tl::detail::expected_delete_assign_base< T, E, EnableCopy, EnableMove >
 
struct  tl::detail::expected_delete_assign_base< T, E, true, false >
 
struct  tl::detail::expected_delete_assign_base< T, E, false, true >
 
struct  tl::detail::expected_delete_assign_base< T, E, false, false >
 
struct  tl::detail::default_constructor_tag
 
struct  tl::detail::expected_default_ctor_base< T, E, Enable >
 
struct  tl::detail::expected_default_ctor_base< T, E, false >
 
class  tl::bad_expected_access< E >
 
class  tl::expected< T, E >
 
struct  ada::url_aggregator
 Lightweight URL struct. More...
 
struct  ada::url
 Generic URL struct reliant on std::string instantiation. More...
 
struct  ada::url_search_params
 
struct  ada::url_search_params_iter< T, Type >
 

Namespaces

namespace  ada
 
namespace  ada::idna
 
namespace  ada::character_sets
 Includes the definitions for unicode character sets.
 
namespace  ada::checkers
 Includes the definitions for validation functions.
 
namespace  ada::scheme
 Includes the scheme declarations.
 
namespace  ada::helpers
 Includes the definitions for helper functions.
 
namespace  tl
 
namespace  tl::detail
 
namespace  tl::detail::swap_adl_tests
 
namespace  ada::parser
 Includes the definitions for supported parsers.
 
namespace  ada::scheme::details
 Includes the definitions for scheme specific entities.
 
namespace  ada::serializers
 Includes the definitions for URL serializers.
 
namespace  ada::unicode
 Includes the declarations for unicode operations.
 

Macros

#define ADA_IDNA_H
 
#define ADA_IDNA_UNICODE_TRANSCODING_H
 
#define ADA_IDNA_MAPPING_H
 
#define ADA_IDNA_NORMALIZATION_H
 
#define ADA_IDNA_PUNYCODE_H
 
#define ADA_IDNA_VALIDITY_H
 
#define ADA_IDNA_TO_ASCII_H
 
#define ADA_IDNA_TO_UNICODE_H
 
#define ADA_CHARACTER_SETS_INL_H
 
#define ADA_CHARACTER_SETS_H
 
#define ADA_COMMON_DEFS_H
 
#define ADA_BEGIN_DEBUG_BLOCK(name)
 
#define ADA_END_DEBUG_BLOCK(name)
 
#define ADA_DEBUG_BLOCK(name, block)
 
#define ADA_ROUNDUP_N(a, n)   (((a) + ((n)-1)) & ~((n)-1))
 
#define ADA_ROUNDDOWN_N(a, n)   ((a) & ~((n)-1))
 
#define ADA_ISALIGNED_N(ptr, n)   (((uintptr_t)(ptr) & ((n)-1)) == 0)
 
#define ada_really_inline   inline __attribute__((always_inline))
 
#define ada_never_inline   inline __attribute__((noinline))
 
#define ada_unused   __attribute__((unused))
 
#define ada_warn_unused   __attribute__((warn_unused_result))
 
#define ada_likely(x)   __builtin_expect(!!(x), 1)
 
#define ada_unlikely(x)   __builtin_expect(!!(x), 0)
 
#define ADA_PUSH_DISABLE_WARNINGS   _Pragma("GCC diagnostic push")
 
#define ADA_PUSH_DISABLE_ALL_WARNINGS
 
#define ADA_PRAGMA(P)   _Pragma(#P)
 
#define ADA_DISABLE_GCC_WARNING(WARNING)    ADA_PRAGMA(GCC diagnostic ignored WARNING)
 
#define ADA_DISABLE_UNDESIRED_WARNINGS
 
#define ADA_DISABLE_DEPRECATED_WARNING    ADA_DISABLE_GCC_WARNING("-Wdeprecated-declarations")
 
#define ADA_DISABLE_STRICT_OVERFLOW_WARNING    ADA_DISABLE_GCC_WARNING("-Wstrict-overflow")
 
#define ADA_POP_DISABLE_WARNINGS   _Pragma("GCC diagnostic pop")
 
#define ADA_DLLIMPORTEXPORT
 
#define ADA_TRY(EXPR)
 If EXPR is an error, returns it.
 
#define __has_cpp_attribute(x)   0
 
#define ADA_ATTRIBUTE_NOINLINE
 
#define ada_constexpr   constexpr
 
#define ADA_IS_BIG_ENDIAN   0
 
#define ADA_IS_BIG_ENDIAN   0
 
#define ADA_DEVELOPMENT_CHECKS   1
 
#define ADA_STR(x)   #x
 
#define ADA_REQUIRE(EXPR)
 
#define ADA_FAIL(MESSAGE)
 
#define ADA_ASSERT_EQUAL(LHS, RHS, MESSAGE)
 
#define ADA_ASSERT_TRUE(COND)
 
#define ADA_ASSUME(COND)
 
#define ada_lifetime_bound
 
#define ADA_CHECKERS_INL_H
 
#define ADA_LOG_H
 
#define ADA_LOGGING   0
 
#define ada_log(...)
 
#define ADA_ENCODING_TYPE_H
 
#define ADA_HELPERS_H
 
#define ADA_STATE_H
 
#define ADA_URL_BASE_H
 
#define ADA_URL_COMPONENTS_H
 
#define ADA_SCHEME_H
 
#define ADA_PARSER_H
 
#define TL_EXPECTED_HPP
 
#define TL_EXPECTED_VERSION_MAJOR   1
 
#define TL_EXPECTED_VERSION_MINOR   1
 
#define TL_EXPECTED_VERSION_PATCH   0
 
#define TL_EXPECTED_MSVC2015_CONSTEXPR   constexpr
 
#define TL_ASSERT(x)
 
#define TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T)    std::is_trivially_copy_constructible<T>
 
#define TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T)    std::is_trivially_copy_assignable<T>
 
#define TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T)    std::is_trivially_destructible<T>
 
#define TL_EXPECTED_GCC49_CONSTEXPR   constexpr
 
#define TL_EXPECTED_11_CONSTEXPR   constexpr
 
#define TL_MONOSTATE_INPLACE_MUTEX
 
#define TL_TRAITS_MUTEX
 
#define ADA_SCHEME_INL_H
 
#define ADA_SERIALIZERS_H
 
#define ADA_UNICODE_H
 
#define ADA_URL_BASE_INL_H
 
#define ADA_URL_AGGREGATOR_H
 
#define ADA_CHECKERS_H
 
#define ADA_URL_H
 
#define ADA_URL_INL_H
 
#define ADA_URL_AGGREGATOR_INL_H
 
#define ADA_UNICODE_INL_H
 
#define ADA_URL_SEARCH_PARAMS_H
 
#define ADA_URL_SEARCH_PARAMS_INL_H
 
#define ADA_ADA_VERSION_H
 
#define ADA_VERSION   "2.9.2"
 
#define ADA_IMPLEMENTATION_H
 

Typedefs

template<class T >
using tl::detail::remove_const_t = typename std::remove_const<T>::type
 
template<class T >
using tl::detail::remove_reference_t = typename std::remove_reference<T>::type
 
template<class T >
using tl::detail::decay_t = typename std::decay<T>::type
 
template<bool E, class T = void>
using tl::detail::enable_if_t = typename std::enable_if<E, T>::type
 
template<bool B, class T , class F >
using tl::detail::conditional_t = typename std::conditional<B, T, F>::type
 
template<class F , class... Us>
using tl::detail::invoke_result = invoke_result_impl<F, void, Us...>
 
template<class F , class... Us>
using tl::detail::invoke_result_t = typename invoke_result<F, Us...>::type
 
template<class T >
using tl::detail::is_expected = is_expected_impl<decay_t<T>>
 
template<class T , class E , class U >
using tl::detail::expected_enable_forward_value
 
template<class T , class E , class U , class G , class UR , class GR >
using tl::detail::expected_enable_from_other
 
template<class T , class U >
using tl::detail::is_void_or = conditional_t<std::is_void<T>::value, std::true_type, U>
 
template<class T >
using tl::detail::is_copy_constructible_or_void
 
template<class T >
using tl::detail::is_move_constructible_or_void
 
template<class T >
using tl::detail::is_copy_assignable_or_void = is_void_or<T, std::is_copy_assignable<T>>
 
template<class T >
using tl::detail::is_move_assignable_or_void = is_void_or<T, std::is_move_assignable<T>>
 
template<class Exp >
using tl::detail::exp_t = typename detail::decay_t<Exp>::value_type
 
template<class Exp >
using tl::detail::err_t = typename detail::decay_t<Exp>::error_type
 
template<class Exp , class Ret >
using tl::detail::ret_t = expected<Ret, err_t<Exp>>
 

Enumerations

enum class  ada::encoding_type {
  ada::UTF8 , ada::UTF_16LE , ada::UTF_16BE , ada::UTF8 ,
  ada::UTF_16LE , ada::UTF_16BE
}
 
enum class  ada::state {
  ada::AUTHORITY , ada::SCHEME_START , ada::SCHEME , ada::HOST ,
  ada::NO_SCHEME , ada::FRAGMENT , ada::RELATIVE_SCHEME , ada::RELATIVE_SLASH ,
  ada::FILE , ada::FILE_HOST , ada::FILE_SLASH , ada::PATH_OR_AUTHORITY ,
  ada::SPECIAL_AUTHORITY_IGNORE_SLASHES , ada::SPECIAL_AUTHORITY_SLASHES , ada::SPECIAL_RELATIVE_OR_AUTHORITY , ada::QUERY ,
  ada::PATH , ada::PATH_START , ada::OPAQUE_PATH , ada::PORT ,
  ada::AUTHORITY , ada::SCHEME_START , ada::SCHEME , ada::HOST ,
  ada::NO_SCHEME , ada::FRAGMENT , ada::RELATIVE_SCHEME , ada::RELATIVE_SLASH ,
  ada::FILE , ada::FILE_HOST , ada::FILE_SLASH , ada::PATH_OR_AUTHORITY ,
  ada::SPECIAL_AUTHORITY_IGNORE_SLASHES , ada::SPECIAL_AUTHORITY_SLASHES , ada::SPECIAL_RELATIVE_OR_AUTHORITY , ada::QUERY ,
  ada::PATH , ada::PATH_START , ada::OPAQUE_PATH , ada::PORT
}
 
enum  ada::scheme::type : uint8_t {
  ada::scheme::HTTP = 0 , ada::scheme::NOT_SPECIAL = 1 , ada::scheme::HTTPS = 2 , ada::scheme::WS = 3 ,
  ada::scheme::FTP = 4 , ada::scheme::WSS = 5 , ada::scheme::FILE = 6 , ada::scheme::HTTP = 0 ,
  ada::scheme::NOT_SPECIAL = 1 , ada::scheme::HTTPS = 2 , ada::scheme::WS = 3 , ada::scheme::FTP = 4 ,
  ada::scheme::WSS = 5 , ada::scheme::FILE = 6
}
 
enum  ada::url_host_type : uint8_t {
  ada::DEFAULT = 0 , ada::IPV4 = 1 , ada::IPV6 = 2 , ada::DEFAULT = 0 ,
  ada::IPV4 = 1 , ada::IPV6 = 2
}
 
enum class  ada::url_search_params_iter_type {
  ada::KEYS , ada::VALUES , ada::ENTRIES , ada::KEYS ,
  ada::VALUES , ada::ENTRIES
}
 
enum  { ada::ADA_VERSION_MAJOR = 2 , ada::ADA_VERSION_MINOR = 9 , ada::ADA_VERSION_REVISION = 2 }
 
enum class  ada::errors { ada::generic_error , ada::generic_error }
 

Functions

size_t ada::idna::utf8_to_utf32 (const char *buf, size_t len, char32_t *utf32_output)
 
size_t ada::idna::utf8_length_from_utf32 (const char32_t *buf, size_t len)
 
size_t ada::idna::utf32_length_from_utf8 (const char *buf, size_t len)
 
size_t ada::idna::utf32_to_utf8 (const char32_t *buf, size_t len, char *utf8_output)
 
void ada::idna::ascii_map (char *input, size_t length)
 
bool ada::idna::ascii_has_upper_case (char *input, size_t length)
 
std::u32string ada::idna::map (std::u32string_view input)
 
void ada::idna::normalize (std::u32string &input)
 
bool ada::idna::punycode_to_utf32 (std::string_view input, std::u32string &out)
 
bool ada::idna::verify_punycode (std::string_view input)
 
bool ada::idna::utf32_to_punycode (std::u32string_view input, std::string &out)
 
bool ada::idna::is_label_valid (std::u32string_view label)
 
std::string ada::idna::to_ascii (std::string_view ut8_string)
 
bool ada::idna::contains_forbidden_domain_code_point (std::string_view ascii_string)
 
bool ada::idna::begins_with (std::u32string_view view, std::u32string_view prefix)
 
bool ada::idna::begins_with (std::string_view view, std::string_view prefix)
 
bool constexpr ada::idna::is_ascii (std::u32string_view view)
 
bool constexpr ada::idna::is_ascii (std::string_view view)
 
std::string ada::idna::to_unicode (std::string_view input)
 
void ada::unreachable ()
 
ada_really_inline bool ada::character_sets::bit_at (const uint8_t a[], const uint8_t i)
 
bool ada::checkers::has_hex_prefix_unsafe (std::string_view input)
 
bool ada::checkers::has_hex_prefix (std::string_view input)
 
constexpr bool ada::checkers::is_digit (char x) noexcept
 
constexpr char ada::checkers::to_lower (char x) noexcept
 
constexpr bool ada::checkers::is_alpha (char x) noexcept
 
constexpr bool ada::checkers::is_windows_drive_letter (std::string_view input) noexcept
 
constexpr bool ada::checkers::is_normalized_windows_drive_letter (std::string_view input) noexcept
 
ada_really_inline bool ada::checkers::begins_with (std::string_view view, std::string_view prefix)
 
ada_warn_unused std::string ada::to_string (encoding_type type)
 
ada_warn_unused std::string ada::to_string (ada::state s)
 
constexpr uint16_t ada::scheme::get_special_port (std::string_view scheme) noexcept
 
constexpr uint16_t ada::scheme::get_special_port (ada::scheme::type type) noexcept
 
constexpr ada::scheme::type ada::scheme::get_scheme_type (std::string_view scheme) noexcept
 
template<class E >
constexpr bool tl::operator== (const unexpected< E > &lhs, const unexpected< E > &rhs)
 
template<class E >
constexpr bool tl::operator!= (const unexpected< E > &lhs, const unexpected< E > &rhs)
 
template<class E >
constexpr bool tl::operator< (const unexpected< E > &lhs, const unexpected< E > &rhs)
 
template<class E >
constexpr bool tl::operator<= (const unexpected< E > &lhs, const unexpected< E > &rhs)
 
template<class E >
constexpr bool tl::operator> (const unexpected< E > &lhs, const unexpected< E > &rhs)
 
template<class E >
constexpr bool tl::operator>= (const unexpected< E > &lhs, const unexpected< E > &rhs)
 
template<class E >
unexpected< typename std::decay< E >::type > tl::make_unexpected (E &&e)
 
template<typename E >
TL_EXPECTED_11_CONSTEXPR void tl::detail::throw_exception (E &&e)
 
template<typename Fn , typename... Args, typename = enable_if_t<std::is_member_pointer<decay_t<Fn>>::value>, int = 0>
constexpr auto tl::detail::invoke (Fn &&f, Args &&...args) noexcept(noexcept(std::mem_fn(f)(std::forward< Args >(args)...))) -> decltype(std::mem_fn(f)(std::forward< Args >(args)...))
 
template<typename Fn , typename... Args, typename = enable_if_t<!std::is_member_pointer<decay_t<Fn>>::value>>
constexpr auto tl::detail::invoke (Fn &&f, Args &&...args) noexcept(noexcept(std::forward< Fn >(f)(std::forward< Args >(args)...))) -> decltype(std::forward< Fn >(f)(std::forward< Args >(args)...))
 
template<class T >
tag tl::detail::swap_adl_tests::swap (T &, T &)
 
template<class T , std::size_t N>
tag tl::detail::swap_adl_tests::swap (T(&a)[N], T(&b)[N])
 
template<class , class >
std::false_type tl::detail::swap_adl_tests::can_swap (...) noexcept(false)
 
template<class T , class U , class = decltype(swap(std::declval<T &>(), std::declval<U &>()))>
std::true_type tl::detail::swap_adl_tests::can_swap (int) noexcept(noexcept(swap(std::declval< T & >(), std::declval< U & >())))
 
template<class , class >
std::false_type tl::detail::swap_adl_tests::uses_std (...)
 
template<class T , class U >
std::is_same< decltype(swap(std::declval< T & >(), std::declval< U & >())), tagtl::detail::swap_adl_tests::uses_std (int)
 
template<class Exp , class F , class Ret = decltype(detail::invoke(std::declval<F>(), *std::declval<Exp>())), detail::enable_if_t<!std::is_void< exp_t< Exp > >::value > * = nullptr>
auto tl::detail::and_then_impl (Exp &&exp, F &&f) -> Ret
 
template<class Exp , class F , class Ret = decltype(detail::invoke(std::declval<F>())), detail::enable_if_t< std::is_void< exp_t< Exp > >::value > * = nullptr>
constexpr auto tl::detail::and_then_impl (Exp &&exp, F &&f) -> Ret
 
template<class Exp , class F , detail::enable_if_t<!std::is_void< exp_t< Exp > >::value > * = nullptr, class Ret = decltype(detail::invoke(std::declval<F>(), *std::declval<Exp>())), detail::enable_if_t<!std::is_void< Ret >::value > * = nullptr>
constexpr auto tl::detail::expected_map_impl (Exp &&exp, F &&f) -> ret_t< Exp, detail::decay_t< Ret > >
 
template<class Exp , class F , detail::enable_if_t<!std::is_void< exp_t< Exp > >::value > * = nullptr, class Ret = decltype(detail::invoke(std::declval<F>(), *std::declval<Exp>())), detail::enable_if_t< std::is_void< Ret >::value > * = nullptr>
auto tl::detail::expected_map_impl (Exp &&exp, F &&f) -> expected< void, err_t< Exp > >
 
template<class Exp , class F , detail::enable_if_t<!std::is_void< exp_t< Exp > >::value > * = nullptr, class Ret = decltype(detail::invoke(std::declval<F>(), std::declval<Exp>().error())), detail::enable_if_t<!std::is_void< Ret >::value > * = nullptr>
constexpr auto tl::detail::map_error_impl (Exp &&exp, F &&f) -> expected< exp_t< Exp >, detail::decay_t< Ret > >
 
template<class Exp , class F , detail::enable_if_t<!std::is_void< exp_t< Exp > >::value > * = nullptr, class Ret = decltype(detail::invoke(std::declval<F>(), std::declval<Exp>().error())), detail::enable_if_t< std::is_void< Ret >::value > * = nullptr>
auto tl::detail::map_error_impl (Exp &&exp, F &&f) -> expected< exp_t< Exp >, monostate >
 
template<class Exp , class F , class Ret = decltype(detail::invoke(std::declval<F>(), std::declval<Exp>().error())), detail::enable_if_t<!std::is_void< Ret >::value > * = nullptr>
auto tl::detail::or_else_impl (Exp &&exp, F &&f) -> Ret
 
template<class Exp , class F , class Ret = decltype(detail::invoke(std::declval<F>(), std::declval<Exp>().error())), detail::enable_if_t< std::is_void< Ret >::value > * = nullptr>
detail::decay_t< Exp > tl::detail::or_else_impl (Exp &&exp, F &&f)
 
template<class T , class E , class U , class F >
constexpr bool tl::operator== (const expected< T, E > &lhs, const expected< U, F > &rhs)
 
template<class T , class E , class U , class F >
constexpr bool tl::operator!= (const expected< T, E > &lhs, const expected< U, F > &rhs)
 
template<class E , class F >
constexpr bool tl::operator== (const expected< void, E > &lhs, const expected< void, F > &rhs)
 
template<class E , class F >
constexpr bool tl::operator!= (const expected< void, E > &lhs, const expected< void, F > &rhs)
 
template<class T , class E , class U >
constexpr bool tl::operator== (const expected< T, E > &x, const U &v)
 
template<class T , class E , class U >
constexpr bool tl::operator== (const U &v, const expected< T, E > &x)
 
template<class T , class E , class U >
constexpr bool tl::operator!= (const expected< T, E > &x, const U &v)
 
template<class T , class E , class U >
constexpr bool tl::operator!= (const U &v, const expected< T, E > &x)
 
template<class T , class E >
constexpr bool tl::operator== (const expected< T, E > &x, const unexpected< E > &e)
 
template<class T , class E >
constexpr bool tl::operator== (const unexpected< E > &e, const expected< T, E > &x)
 
template<class T , class E >
constexpr bool tl::operator!= (const expected< T, E > &x, const unexpected< E > &e)
 
template<class T , class E >
constexpr bool tl::operator!= (const unexpected< E > &e, const expected< T, E > &x)
 
template<class T , class E , detail::enable_if_t<(std::is_void< T >::value||std::is_move_constructible< T >::value) &&detail::is_swappable< T >::value &&std::is_move_constructible< E >::value &&detail::is_swappable< E >::value > * = nullptr>
void tl::swap (expected< T, E > &lhs, expected< T, E > &rhs) noexcept(noexcept(lhs.swap(rhs)))
 
template<typename result_type = ada::url_aggregator>
result_type ada::parser::parse_url (std::string_view user_input, const result_type *base_url=nullptr)
 
template url_aggregator ada::parser::parse_url< url_aggregator > (std::string_view user_input, const url_aggregator *base_url)
 
template url ada::parser::parse_url< url > (std::string_view user_input, const url *base_url)
 
template<typename result_type = ada::url_aggregator, bool store_values = true>
result_type ada::parser::parse_url_impl (std::string_view user_input, const result_type *base_url=nullptr)
 
template url_aggregator ada::parser::parse_url_impl< url_aggregator > (std::string_view user_input, const url_aggregator *base_url)
 
template url ada::parser::parse_url_impl< url > (std::string_view user_input, const url *base_url)
 
void ada::serializers::find_longest_sequence_of_ipv6_pieces (const std::array< uint16_t, 8 > &address, size_t &compress, size_t &compress_length) noexcept
 
std::string ada::serializers::ipv6 (const std::array< uint16_t, 8 > &address) noexcept
 
std::string ada::serializers::ipv4 (uint64_t address) noexcept
 
ada_really_inline size_t ada::unicode::percent_encode_index (const std::string_view input, const uint8_t character_set[])
 
std::ostream & ada::operator<< (std::ostream &out, const ada::url &u)
 
std::ostream & ada::operator<< (std::ostream &out, const ada::url_aggregator &u)
 
template<class result_type = ada::url_aggregator>
ada_warn_unused ada::result< result_type > ada::parse (std::string_view input, const result_type *base_url=nullptr)
 
template ada::result< urlada::parse< url > (std::string_view input, const url *base_url)
 
template ada::result< url_aggregatorada::parse< url_aggregator > (std::string_view input, const url_aggregator *base_url)
 
bool ada::can_parse (std::string_view input, const std::string_view *base_input=nullptr)
 
std::string ada::href_from_file (std::string_view path)
 

Variables

static constexpr in_place_t tl::in_place {}
 
static constexpr unexpect_t tl::unexpect {}
 
static constexpr no_init_t tl::detail::no_init {}
 

Detailed Description

Includes all definitions for Ada.

Definition in file ada.h.

Macro Definition Documentation

◆ __has_cpp_attribute

#define __has_cpp_attribute ( x)    0

Definition at line 337 of file ada.h.

◆ ADA_ADA_VERSION_H

#define ADA_ADA_VERSION_H

Definition at line 7308 of file ada.h.

◆ ADA_ASSERT_EQUAL

#define ADA_ASSERT_EQUAL ( LHS,
RHS,
MESSAGE )
Value:
do { \
if (LHS != RHS) { \
std::cerr << "Mismatch: '" << LHS << "' - '" << RHS << "'" << std::endl; \
ADA_FAIL(MESSAGE); \
} \
} while (0);

Definition at line 440 of file ada.h.

◆ ADA_ASSERT_TRUE

#define ADA_ASSERT_TRUE ( COND)
Value:
do { \
if (!(COND)) { \
std::cerr << "Assert at line " << __LINE__ << " of file " << __FILE__ \
<< std::endl; \
ADA_FAIL(ADA_STR(COND)); \
} \
} while (0);
#define ADA_STR(x)
Definition ada.h:428

Definition at line 447 of file ada.h.

◆ ADA_ASSUME

#define ADA_ASSUME ( COND)
Value:
do { \
if (!(COND)) { \
__builtin_unreachable(); \
} \
} while (0)

Definition at line 464 of file ada.h.

◆ ADA_ATTRIBUTE_NOINLINE

#define ADA_ATTRIBUTE_NOINLINE

Definition at line 343 of file ada.h.

◆ ADA_BEGIN_DEBUG_BLOCK

#define ADA_BEGIN_DEBUG_BLOCK ( name)

Definition at line 214 of file ada.h.

◆ ADA_CHARACTER_SETS_H

#define ADA_CHARACTER_SETS_H

Definition at line 179 of file ada.h.

◆ ADA_CHARACTER_SETS_INL_H

#define ADA_CHARACTER_SETS_INL_H

Definition at line 169 of file ada.h.

◆ ADA_CHECKERS_H

#define ADA_CHECKERS_H

Definition at line 5128 of file ada.h.

◆ ADA_CHECKERS_INL_H

#define ADA_CHECKERS_INL_H

Definition at line 1029 of file ada.h.

◆ ADA_COMMON_DEFS_H

#define ADA_COMMON_DEFS_H

Definition at line 187 of file ada.h.

◆ ada_constexpr

#define ada_constexpr   constexpr

Definition at line 366 of file ada.h.

◆ ADA_DEBUG_BLOCK

#define ADA_DEBUG_BLOCK ( name,
block )

Definition at line 216 of file ada.h.

◆ ADA_DEVELOPMENT_CHECKS

#define ADA_DEVELOPMENT_CHECKS   1

Definition at line 423 of file ada.h.

◆ ADA_DISABLE_DEPRECATED_WARNING

#define ADA_DISABLE_DEPRECATED_WARNING    ADA_DISABLE_GCC_WARNING("-Wdeprecated-declarations")

Definition at line 303 of file ada.h.

◆ ADA_DISABLE_GCC_WARNING

#define ADA_DISABLE_GCC_WARNING ( WARNING)     ADA_PRAGMA(GCC diagnostic ignored WARNING)

Definition at line 295 of file ada.h.

◆ ADA_DISABLE_STRICT_OVERFLOW_WARNING

#define ADA_DISABLE_STRICT_OVERFLOW_WARNING    ADA_DISABLE_GCC_WARNING("-Wstrict-overflow")

Definition at line 305 of file ada.h.

◆ ADA_DISABLE_UNDESIRED_WARNINGS

#define ADA_DISABLE_UNDESIRED_WARNINGS

Definition at line 301 of file ada.h.

◆ ADA_DLLIMPORTEXPORT

#define ADA_DLLIMPORTEXPORT

Definition at line 323 of file ada.h.

◆ ADA_ENCODING_TYPE_H

#define ADA_ENCODING_TYPE_H

Definition at line 1177 of file ada.h.

◆ ADA_END_DEBUG_BLOCK

#define ADA_END_DEBUG_BLOCK ( name)

Definition at line 215 of file ada.h.

◆ ADA_FAIL

#define ADA_FAIL ( MESSAGE)
Value:
do { \
std::cerr << "FAIL: " << (MESSAGE) << std::endl; \
abort(); \
} while (0);

Definition at line 435 of file ada.h.

◆ ADA_HELPERS_H

#define ADA_HELPERS_H

Definition at line 1210 of file ada.h.

◆ ADA_IDNA_H

#define ADA_IDNA_H

Definition at line 14 of file ada.h.

◆ ADA_IDNA_MAPPING_H

#define ADA_IDNA_MAPPING_H

Definition at line 39 of file ada.h.

◆ ADA_IDNA_NORMALIZATION_H

#define ADA_IDNA_NORMALIZATION_H

Definition at line 59 of file ada.h.

◆ ADA_IDNA_PUNYCODE_H

#define ADA_IDNA_PUNYCODE_H

Definition at line 74 of file ada.h.

◆ ADA_IDNA_TO_ASCII_H

#define ADA_IDNA_TO_ASCII_H

Definition at line 109 of file ada.h.

◆ ADA_IDNA_TO_UNICODE_H

#define ADA_IDNA_TO_UNICODE_H

Definition at line 145 of file ada.h.

◆ ADA_IDNA_UNICODE_TRANSCODING_H

#define ADA_IDNA_UNICODE_TRANSCODING_H

Definition at line 18 of file ada.h.

◆ ADA_IDNA_VALIDITY_H

#define ADA_IDNA_VALIDITY_H

Definition at line 91 of file ada.h.

◆ ADA_IMPLEMENTATION_H

#define ADA_IMPLEMENTATION_H

Definition at line 7331 of file ada.h.

◆ ADA_IS_BIG_ENDIAN [1/2]

#define ADA_IS_BIG_ENDIAN   0

Definition at line 392 of file ada.h.

◆ ADA_IS_BIG_ENDIAN [2/2]

#define ADA_IS_BIG_ENDIAN   0

Definition at line 392 of file ada.h.

◆ ADA_ISALIGNED_N

#define ADA_ISALIGNED_N ( ptr,
n )   (((uintptr_t)(ptr) & ((n)-1)) == 0)

Definition at line 223 of file ada.h.

◆ ada_lifetime_bound

#define ada_lifetime_bound

Definition at line 491 of file ada.h.

◆ ada_likely

#define ada_likely ( x)    __builtin_expect(!!(x), 1)

Definition at line 272 of file ada.h.

◆ ada_log

◆ ADA_LOG_H

#define ADA_LOG_H

Definition at line 1098 of file ada.h.

◆ ADA_LOGGING

#define ADA_LOGGING   0

Definition at line 1103 of file ada.h.

◆ ada_never_inline

#define ada_never_inline   inline __attribute__((noinline))

Definition at line 266 of file ada.h.

◆ ADA_PARSER_H

#define ADA_PARSER_H

Definition at line 1868 of file ada.h.

◆ ADA_POP_DISABLE_WARNINGS

#define ADA_POP_DISABLE_WARNINGS   _Pragma("GCC diagnostic pop")

Definition at line 307 of file ada.h.

◆ ADA_PRAGMA

#define ADA_PRAGMA ( P)    _Pragma(#P)

Definition at line 294 of file ada.h.

◆ ADA_PUSH_DISABLE_ALL_WARNINGS

#define ADA_PUSH_DISABLE_ALL_WARNINGS
Value:
ADA_PUSH_DISABLE_WARNINGS \
ADA_DISABLE_GCC_WARNING("-Weffc++") \
ADA_DISABLE_GCC_WARNING("-Wall") \
ADA_DISABLE_GCC_WARNING("-Wconversion") \
ADA_DISABLE_GCC_WARNING("-Wextra") \
ADA_DISABLE_GCC_WARNING("-Wattributes") \
ADA_DISABLE_GCC_WARNING("-Wimplicit-fallthrough") \
ADA_DISABLE_GCC_WARNING("-Wnon-virtual-dtor") \
ADA_DISABLE_GCC_WARNING("-Wreturn-type") \
ADA_DISABLE_GCC_WARNING("-Wshadow") \
ADA_DISABLE_GCC_WARNING("-Wunused-parameter") \
ADA_DISABLE_GCC_WARNING("-Wunused-variable")

Definition at line 281 of file ada.h.

◆ ADA_PUSH_DISABLE_WARNINGS

#define ADA_PUSH_DISABLE_WARNINGS   _Pragma("GCC diagnostic push")

Definition at line 278 of file ada.h.

◆ ada_really_inline

#define ada_really_inline   inline __attribute__((always_inline))

Definition at line 265 of file ada.h.

◆ ADA_REQUIRE

#define ADA_REQUIRE ( EXPR)
Value:
{ \
if (!(EXPR) { abort(); }) }

Definition at line 431 of file ada.h.

◆ ADA_ROUNDDOWN_N

#define ADA_ROUNDDOWN_N ( a,
n )   ((a) & ~((n)-1))

Definition at line 221 of file ada.h.

◆ ADA_ROUNDUP_N

#define ADA_ROUNDUP_N ( a,
n )   (((a) + ((n)-1)) & ~((n)-1))

Definition at line 220 of file ada.h.

◆ ADA_SCHEME_H

#define ADA_SCHEME_H

Definition at line 1434 of file ada.h.

◆ ADA_SCHEME_INL_H

#define ADA_SCHEME_INL_H

Definition at line 4441 of file ada.h.

◆ ADA_SERIALIZERS_H

#define ADA_SERIALIZERS_H

Definition at line 4529 of file ada.h.

◆ ADA_STATE_H

#define ADA_STATE_H

Definition at line 1218 of file ada.h.

◆ ADA_STR

#define ADA_STR ( x)    #x

Definition at line 428 of file ada.h.

◆ ADA_TRY

#define ADA_TRY ( EXPR)
Value:
{ \
auto _err = (EXPR); \
if (_err) { \
return _err; \
} \
}

If EXPR is an error, returns it.

Definition at line 327 of file ada.h.

◆ ADA_UNICODE_H

#define ADA_UNICODE_H

Definition at line 4575 of file ada.h.

◆ ADA_UNICODE_INL_H

#define ADA_UNICODE_INL_H

Definition at line 5949 of file ada.h.

◆ ada_unlikely

#define ada_unlikely ( x)    __builtin_expect(!!(x), 0)

Definition at line 275 of file ada.h.

◆ ada_unused

#define ada_unused   __attribute__((unused))

Definition at line 268 of file ada.h.

◆ ADA_URL_AGGREGATOR_H

#define ADA_URL_AGGREGATOR_H

Definition at line 4809 of file ada.h.

◆ ADA_URL_AGGREGATOR_INL_H

#define ADA_URL_AGGREGATOR_INL_H

Definition at line 5941 of file ada.h.

◆ ADA_URL_BASE_H

#define ADA_URL_BASE_H

Definition at line 1345 of file ada.h.

◆ ADA_URL_BASE_INL_H

#define ADA_URL_BASE_INL_H

Definition at line 4801 of file ada.h.

◆ ADA_URL_COMPONENTS_H

#define ADA_URL_COMPONENTS_H

Definition at line 1353 of file ada.h.

◆ ADA_URL_H

#define ADA_URL_H

Definition at line 5252 of file ada.h.

◆ ADA_URL_INL_H

#define ADA_URL_INL_H

Definition at line 5689 of file ada.h.

◆ ADA_URL_SEARCH_PARAMS_H

#define ADA_URL_SEARCH_PARAMS_H

Definition at line 6891 of file ada.h.

◆ ADA_URL_SEARCH_PARAMS_INL_H

#define ADA_URL_SEARCH_PARAMS_INL_H

Definition at line 7081 of file ada.h.

◆ ADA_VERSION

#define ADA_VERSION   "2.9.2"

Definition at line 7310 of file ada.h.

◆ ada_warn_unused

#define ada_warn_unused   __attribute__((warn_unused_result))

Definition at line 269 of file ada.h.

◆ TL_ASSERT

◆ TL_EXPECTED_11_CONSTEXPR

#define TL_EXPECTED_11_CONSTEXPR   constexpr

Definition at line 2004 of file ada.h.

◆ TL_EXPECTED_GCC49_CONSTEXPR

#define TL_EXPECTED_GCC49_CONSTEXPR   constexpr

Definition at line 1997 of file ada.h.

◆ TL_EXPECTED_HPP

#define TL_EXPECTED_HPP

Definition at line 1895 of file ada.h.

◆ TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE

#define TL_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE ( T)     std::is_trivially_copy_assignable<T>

Definition at line 1984 of file ada.h.

◆ TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE

#define TL_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE ( T)     std::is_trivially_copy_constructible<T>

Definition at line 1982 of file ada.h.

◆ TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE

#define TL_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE ( T)     std::is_trivially_destructible<T>

Definition at line 1986 of file ada.h.

◆ TL_EXPECTED_MSVC2015_CONSTEXPR

#define TL_EXPECTED_MSVC2015_CONSTEXPR   constexpr

Definition at line 1914 of file ada.h.

◆ TL_EXPECTED_VERSION_MAJOR

#define TL_EXPECTED_VERSION_MAJOR   1

Definition at line 1897 of file ada.h.

◆ TL_EXPECTED_VERSION_MINOR

#define TL_EXPECTED_VERSION_MINOR   1

Definition at line 1898 of file ada.h.

◆ TL_EXPECTED_VERSION_PATCH

#define TL_EXPECTED_VERSION_PATCH   0

Definition at line 1899 of file ada.h.

◆ TL_MONOSTATE_INPLACE_MUTEX

#define TL_MONOSTATE_INPLACE_MUTEX

Definition at line 2012 of file ada.h.

◆ TL_TRAITS_MUTEX

#define TL_TRAITS_MUTEX

Definition at line 2107 of file ada.h.