Kylin/HttpProxy/TemplateMatchs.cpp

13 lines
442 B
C++
Raw Normal View History

2023-07-21 15:28:59 +08:00
#include "TemplateMatchs.h"
TemplateMatchStorageBase::const_reference TemplateMatchStorageBase::at(boost::urls::string_view id) const {
for (std::size_t i = 0; i < size(); ++i) {
if (ids()[i] == id) return matches()[i];
}
boost::throw_exception(std::out_of_range(""));
}
TemplateMatchStorageBase::const_reference TemplateMatchStorageBase::operator[](boost::urls::string_view id) const {
return at(id);
}