23 template<
typename T >
24 constexpr T
mask(
unsigned bits_to_extract )
26 return bits_to_extract <= 1u ? T{1} :
27 static_cast<T>((mask<T>(bits_to_extract-1) << 1) | T{1});
30 template<
typename T >
40 struct bits_count<
char> {
static constexpr unsigned count = 8u; };
83 unsigned Bits_To_Extract =
details::bits_count<T>::count,
84 typename F =
unsigned int >
T n_bits_from(F value)
Extract N bits from a bigger integer value.
static constexpr unsigned count
constexpr T mask(unsigned bits_to_extract)
void normalize_to(string_view_t what, char *dest)
Perform normalization of URI value.
static constexpr unsigned count
RESTINIO_NODISCARD expected_t< unescape_percent_encoding_success_t, unescape_percent_encoding_failure_t > do_unescape_percent_encoding(const string_view_t data, Chars_Collector &&collector)
The actual implementation of unescape-percent-encoding procedure.
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, optional_t< Value_Type > >::type opt_value(const Parameter_Container ¶ms, string_view_t key)
Gets the value of a parameter specified by key wrapped in optional_t<Value_Type> if parameter exists ...