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
return
U{value};
20
}
21
22
}
// namespace chaotic::convert
23
24
USERVER_NAMESPACE_END
userver
chaotic
convert.hpp
Generated on Thu Sep 5 2024 11:15:15 for userver by
Doxygen
1.10.0