RESTinio
optional.hpp
Go to the documentation of this file.
1 /*
2  restinio
3 */
4 
5 /*!
6  Adoption for std::optional (c++17).
7 
8  @since v.0.4.4
9 */
10 
11 #pragma once
12 
13 #include "third_party/optional-lite/optional.hpp"
14 
15 namespace restinio
16 {
17  template< class T >
18  using optional_t = nonstd::optional< T >;
19 
20  using nonstd::nullopt;
21  using nonstd::nullopt_t;
22 
23 } /* namespace restinio */
void initialize(V const &value)
Definition: optional.hpp:927
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 &params, string_view_t key)
Gets the value of a parameter specified by key wrapped in optional_t<Value_Type> if parameter exists ...
Definition: value_or.hpp:64