Use named_parameter_t from Seafire::Server
This commit is contained in:
parent
669a54a17b
commit
8bacfde0c1
@ -16,23 +16,18 @@ namespace seafire::routing
|
||||
typename ParameterType = server::string_parameter_t
|
||||
>
|
||||
class host_parameter_t
|
||||
: public server::named_parameter_t<Name>
|
||||
{
|
||||
public:
|
||||
using parameter_type = ParameterType;
|
||||
using value_type = typename parameter_type::value_type;
|
||||
|
||||
static
|
||||
std::string const&
|
||||
name()
|
||||
{
|
||||
static std::string const name{Name};
|
||||
return name;
|
||||
}
|
||||
|
||||
host_parameter_t(std::optional<value_type> value)
|
||||
: _value{std::move(value)}
|
||||
{}
|
||||
|
||||
using server::named_parameter_t<Name>::name;
|
||||
|
||||
std::optional<value_type> const&
|
||||
value() const
|
||||
{
|
||||
|
@ -16,23 +16,18 @@ namespace seafire::routing
|
||||
typename ParameterType = server::string_parameter_t
|
||||
>
|
||||
class route_parameter_t
|
||||
: public server::named_parameter_t<Name>
|
||||
{
|
||||
public:
|
||||
using parameter_type = ParameterType;
|
||||
using value_type = typename parameter_type::value_type;
|
||||
|
||||
static
|
||||
std::string const&
|
||||
name()
|
||||
{
|
||||
static std::string const name{Name};
|
||||
return name;
|
||||
}
|
||||
|
||||
route_parameter_t(std::optional<value_type> value)
|
||||
: _value{std::move(value)}
|
||||
{}
|
||||
|
||||
using server::named_parameter_t<Name>::name;
|
||||
|
||||
std::optional<value_type> const&
|
||||
value() const
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user