32template <
typename Traits >
89 rw.m_route_regex =
nullptr;
97 rw.m_route_regex =
nullptr;
127 const std::string
route{
r.data(),
r.size() };
136 "unable to compile regex \"{}\": {}" ),
150template < std::
size_t Max_Capture_Groups = 20,
int Compile_Options = 0,
int Match_Options = 0 >
163template <
typename Traits = pcre_traits_t<> >
171 static constexpr std::size_t
174 return Traits::max_capture_groups;
185 int options = Traits::compile_options;
209 Traits::match_options,
222 throw exception_t{
"unexpected: not enough submatch vector size" };
238 return static_cast< std::size_t
>(
m.m_begin );
245 return static_cast< std::size_t
>(
m.m_end );
Exception class for all exceptions thrown by RESTinio.
A wrapper for using pcre regexes in express_router.
regex_t(const regex_t &)=delete
regex_t & operator=(const regex_t &)=delete
void compile(string_view_t r, int options)
const pcre * pcre_regex() const
regex_t(regex_t &&rw) noexcept
regex_t(string_view_t r, int options)
A special wrapper around fmtlib include files.
#define RESTINIO_FMT_FORMAT_STRING(s)
run_on_this_thread_settings_t< Traits > on_this_thread()
A special marker for the case when http_server must be run on the context of the current thread.
std::string_view string_view_t
matched_item_descriptor_t(int begin, int end)
A wrapper class for working with pcre match results.
matched_item_descriptor_t operator[](std::size_t i) const
std::array< int, 3 *Traits::max_capture_groups > m_submatches
Regex engine implementation for PCRE.
static constexpr std::size_t max_capture_groups()
static auto compile_regex(string_view_t r, bool is_case_sensative)
Create compiled regex object for a given route.
typename match_results_t::matched_item_descriptor_t matched_item_descriptor_t
static auto submatch_begin_pos(const matched_item_descriptor_t &m)
Get the beginning of a submatch.
static auto try_match(string_view_t target_path, const compiled_regex_t &r, match_results_t &match_results)
Wrapper function for matching logic invokation.
static auto submatch_end_pos(const matched_item_descriptor_t &m)
Get the end of a submatch.
static constexpr std::size_t max_capture_groups
static constexpr int match_options
static constexpr int compile_options