mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
add C++14 version is_signed, is_unsigned
This commit is contained in:
parent
b51e338b68
commit
ead65bf7fd
79 changed files with 310 additions and 114 deletions
|
@ -12,7 +12,7 @@
|
|||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/workaround/std/cstddef.hpp>
|
||||
#include <sprout/type_traits/integral_constant.hpp>
|
||||
#include <sprout/type_traits/std_type_traits.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace detail {
|
||||
|
@ -20,8 +20,8 @@ namespace sprout {
|
|||
struct integer_digits_impl
|
||||
: public sprout::integral_constant<
|
||||
std::size_t,
|
||||
(CHAR_BIT * sizeof(IntType) - (std::is_signed<IntType>::value ? 1 : 0)) * N / D
|
||||
+ ((CHAR_BIT * sizeof(IntType) - (std::is_signed<IntType>::value ? 1 : 0)) * N % D ? 1 : 0)
|
||||
(CHAR_BIT * sizeof(IntType) - (sprout::is_signed<IntType>::value ? 1 : 0)) * N / D
|
||||
+ ((CHAR_BIT * sizeof(IntType) - (sprout::is_signed<IntType>::value ? 1 : 0)) * N % D ? 1 : 0)
|
||||
>
|
||||
{};
|
||||
} // namespace detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue