File tree 2 files changed +12
-8
lines changed
include/boost/redis/adapter/detail
2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 16
16
17
17
#include < set>
18
18
#include < optional>
19
+ #include < type_traits>
19
20
#include < unordered_set>
20
21
#include < forward_list>
21
22
#include < system_error>
37
38
namespace boost ::redis::adapter::detail
38
39
{
39
40
40
- template <class > struct is_integral : std::false_type {};
41
-
42
- template <> struct is_integral <long long int > : std::true_type {};
43
- template <> struct is_integral <unsigned long long int > : std::true_type {};
44
- template <> struct is_integral <int > : std::true_type {};
41
+ // Exclude bools, char and charXY_t types
42
+ template <class T > struct is_integral_number : std::is_integral<T> {};
43
+ template <> struct is_integral_number <bool > : std::false_type {};
44
+ template <> struct is_integral_number <char > : std::false_type {};
45
+ template <> struct is_integral_number <char16_t > : std::false_type {};
46
+ template <> struct is_integral_number <char32_t > : std::false_type {};
47
+ template <> struct is_integral_number <wchar_t > : std::false_type {};
48
+ #ifdef __cpp_char8_t
49
+ template <> struct is_integral_number <char8_t > : std::false_type {};
50
+ #endif
45
51
46
- template <class T , bool = is_integral <T>::value>
52
+ template <class T , bool = is_integral_number <T>::value>
47
53
struct converter ;
48
54
49
55
template <class T >
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ BOOST_AUTO_TEST_CASE(ints)
36
36
ignore_t ,
37
37
signed char ,
38
38
unsigned char ,
39
- char ,
40
39
short ,
41
40
unsigned short ,
42
41
int ,
@@ -66,5 +65,4 @@ BOOST_AUTO_TEST_CASE(ints)
66
65
BOOST_TEST (std::get<8 >(resp).value () == 42 );
67
66
BOOST_TEST (std::get<9 >(resp).value () == 42 );
68
67
BOOST_TEST (std::get<10 >(resp).value () == 42 );
69
- BOOST_TEST (std::get<11 >(resp).value () == 42 );
70
68
}
You can’t perform that action at this time.
0 commit comments