Simplify code
This commit is contained in:
parent
40bae9c49d
commit
3343b51a39
1 changed files with 3 additions and 6 deletions
|
@ -173,7 +173,7 @@ namespace dhandy {
|
|||
return (negate ? -n : n);
|
||||
}
|
||||
|
||||
template <typename I, unsigned int Base, typename Tr>
|
||||
template <typename I, unsigned int Base, typename Tr, typename=void>
|
||||
struct AryConversion {
|
||||
template <typename C>
|
||||
static I from_ary (const C* beg, const C* end) {
|
||||
|
@ -194,16 +194,13 @@ namespace dhandy {
|
|||
}
|
||||
};
|
||||
|
||||
template <typename I, typename Tr, typename=typename std::enable_if<Tr::BehavesLikeASCII and std::is_integral<I>::value and not std::is_same<I, bool>::value and sizeof(I) <= sizeof(uint32_t)>::type>
|
||||
struct SelectIForSSEToInt;
|
||||
|
||||
template <typename I, unsigned int Base, typename Tr>
|
||||
struct AryConversion<SelectIForSSEToInt<I, Tr>, Base, Tr> {
|
||||
struct AryConversion<I, Base, Tr, typename std::enable_if<Tr::BehavesLikeASCII and std::is_integral<I>::value and not std::is_same<I, bool>::value and sizeof(I) <= sizeof(uint32_t)>::type> {
|
||||
template <typename C> static I from_ary (C* beg, C* end) { return to_integer_sse<I, C, Base, Tr>(beg, end - beg); }
|
||||
};
|
||||
|
||||
template <unsigned int Base, typename Tr>
|
||||
struct AryConversion<bool, Base, Tr> {
|
||||
struct AryConversion<bool, Base, Tr, void> {
|
||||
template <typename C> static bool from_ary (C* beg, C* end) {
|
||||
if (end == beg)
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue