userver
C++ Async Framework
Loading...
Searching...
No Matches
convert.hpp
1
#
pragma
once
2
3
#
include
<
type_traits
>
4
5
#
include
<
userver
/
chaotic
/
convert
/
to
.
hpp
>
6
7
USERVER_NAMESPACE_BEGIN
8
9
namespace
chaotic::convert {
10
11
template
<
typename
T,
typename
U>
12
U Convert(
const
T& value,
To
<U>) {
13
static_assert
(
14
std::is_constructible_v<U,
const
T&>,
15
"There is no `Convert(const Value&, chaotic::convert::To<T>)` in "
16
"namespace of `T` or `chaotic::convert`. Probably you have not provided "
17
"a `Convert` function overload."
18
);
19
20
return
U{value};
21
}
22
23
}
// namespace chaotic::convert
24
25
USERVER_NAMESPACE_END
userver
chaotic
convert.hpp
Generated on Tue Nov 19 2024 11:25:46 for userver by
Doxygen
1.10.0