userver
C++ Async Framework
Loading...
Searching...
No Matches
unsigned.hpp
1
#
pragma
once
2
3
#
include
<
cstddef
>
4
5
#
include
<
fmt
/
format
.
h
>
6
7
#
include
<
userver
/
chaotic
/
convert
/
to
.
hpp
>
8
#
include
<
userver
/
chaotic
/
io
/
std
/
uint32_t
.
hpp
>
9
#
include
<
userver
/
utils
/
numeric_cast
.
hpp
>
10
11
USERVER_NAMESPACE_BEGIN
12
13
namespace
chaotic::convert {
14
15
template
<
typename
T>
16
std::enable_if_t<std::is_integral_v<T> && !std::is_same_v<
unsigned
, std::uint32_t>, T> Convert(
unsigned
value, To<T>) {
17
return
utils
::numeric_cast<T>(value);
18
}
19
20
template
<
typename
T>
21
std::enable_if_t<std::is_integral_v<T> && !std::is_same_v<
unsigned
, std::uint32_t>,
unsigned
>
22
Convert(
const
T& value, To<
unsigned
>) {
23
return
utils
::numeric_cast<
unsigned
>(value);
24
}
25
26
}
// namespace chaotic::convert
27
28
USERVER_NAMESPACE_END
userver
chaotic
io
unsigned.hpp
Generated on Wed Dec 4 2024 18:43:06 for userver by
Doxygen
1.10.0