blob: d08b261514aefd90013430f803e96da9a3929517 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#pragma once
#include <type_traits>
namespace NYsonPull {
namespace NDetail {
namespace NTraits {
template <typename T, typename U>
using if_signed = typename std::enable_if<
std::is_signed<T>::value,
U>::type;
template <typename T, typename U>
using if_unsigned = typename std::enable_if<
std::is_unsigned<T>::value,
U>::type;
template <typename T>
using to_unsigned = typename std::enable_if<
std::is_signed<T>::value,
typename std::make_unsigned<T>::type>::type;
template <typename T>
using to_signed = typename std::enable_if<
std::is_unsigned<T>::value,
typename std::make_signed<T>::type>::type;
}
} // namespace NDetail
}
|