RESTinio

Namespaces | Functions
value_or.hpp File Reference
`#include <type_traits>`
`#include <restinio/cast_to.hpp>`
`#include <restinio/uri_helpers.hpp>`
`#include <restinio/router/express.hpp>`

Go to the source code of this file.

## Namespaces
namespace | restinio

## Functions
template<typename Value_Type , typename Parameter_Container >
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, Value_Type >::type | restinio::value_or (const Parameter_Container &params, string_view_t key, Value_Type default_value)
| Get parameter value or a given default. More...
template<typename Value_Type , typename Parameter_Container >
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 | restinio::opt_value (const Parameter_Container &params, string_view_t key)
| Gets the value of a parameter specified by key wrapped in `optional_t<Value_Type>` if parameter exists and empty `optional_t<Value_Type>` if parameter with a given key value doesn't exist. More...