17 #if defined(__has_cpp_attribute
) 20 #if __has_cpp_attribute
(nodiscard) && 21 !(defined(__clang__
) && __cplusplus
< 201703L
) 22 #define RESTINIO_NODISCARD [[nodiscard]] 25 #if __has_cpp_attribute
(fallthrough) && 26 !(defined(__clang__
) && __cplusplus
< 201703L
) 27 #define RESTINIO_FALLTHROUGH [[fallthrough]] 32 #if !defined( RESTINIO_NODISCARD ) 33 #define RESTINIO_NODISCARD 36 #if !defined( RESTINIO_FALLTHROUGH ) 37 #define RESTINIO_FALLTHROUGH 60 #define RESTINIO_ENSURE_NOEXCEPT_CALL(expr) 61 static_assert(noexcept(expr), "this call is expected to be noexcept: " #expr); 89 #define RESTINIO_STATIC_ASSERT_NOEXCEPT(expr) 90 static_assert(noexcept(expr), #expr " is expected to be noexcept" ) 116 #define RESTINIO_STATIC_ASSERT_NOT_NOEXCEPT(expr) 117 static_assert(!noexcept(expr), #expr " is not expected to be noexcept" ) 125 template<
bool Condition >
126 struct static_if_impl;
129 struct static_if_impl<
true>
131 template<
typename If_Part,
typename Else_Part>
132 static decltype(
auto)
133 call( If_Part && if_part, Else_Part && )
140 struct static_if_impl<
false>
142 template<
typename If_Part,
typename Else_Part>
143 static decltype(
auto)
144 call( If_Part &&, Else_Part && else_part )
174 template<
bool Condition,
typename If_Part,
typename Else_Part >
178 return static_if_details::static_if_impl<Condition>::call(
179 std::forward<If_Part>(if_part),
180 std::forward<Else_Part>(else_part) );
static decltype(auto) call(If_Part &&if_part, Else_Part &&)
static decltype(auto) call(If_Part &&, Else_Part &&else_part)
decltype(auto) static_if_else(If_Part &&if_part, Else_Part &&else_part)
An emulation of if constexpr for C++14.
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 ¶ms, string_view_t key)
Gets the value of a parameter specified by key wrapped in optional_t<Value_Type> if parameter exists ...