mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
support for VC++2015
This commit is contained in:
parent
f2c09dd3af
commit
b9440c0e9c
33 changed files with 353 additions and 253 deletions
|
@ -174,11 +174,11 @@ namespace sprout {
|
|||
struct uint_value_t {
|
||||
typedef typename sprout::detail::int_least_helper<
|
||||
5
|
||||
+ (MaxValue <= sprout::numeric_limits<long long>::max())
|
||||
+ (MaxValue <= sprout::numeric_limits<long>::max())
|
||||
+ (MaxValue <= sprout::numeric_limits<int>::max())
|
||||
+ (MaxValue <= sprout::numeric_limits<short>::max())
|
||||
+ (MaxValue <= sprout::numeric_limits<signed char>::max())
|
||||
+ (MaxValue <= static_cast<unsigned long long>(sprout::numeric_limits<long long>::max()))
|
||||
+ (MaxValue <= static_cast<unsigned long long>(sprout::numeric_limits<long>::max()))
|
||||
+ (MaxValue <= static_cast<unsigned long long>(sprout::numeric_limits<int>::max()))
|
||||
+ (MaxValue <= static_cast<unsigned long long>(sprout::numeric_limits<short>::max()))
|
||||
+ (MaxValue <= static_cast<unsigned long long>(sprout::numeric_limits<signed char>::max()))
|
||||
>::least least;
|
||||
typedef typename sprout::detail::int_fast_t<least>::type fast;
|
||||
};
|
||||
|
|
|
@ -43,8 +43,8 @@ namespace sprout {
|
|||
struct low_bits_mask_t<sprout::numeric_limits<TYPE>::digits> { \
|
||||
public: \
|
||||
typedef sprout::numeric_limits<TYPE> limits_type; \
|
||||
typedef typename sprout::detail::uint_t<limits_type::digits>::least least; \
|
||||
typedef typename sprout::detail::uint_t<limits_type::digits>::fast fast; \
|
||||
typedef sprout::detail::uint_t<limits_type::digits>::least least; \
|
||||
typedef sprout::detail::uint_t<limits_type::digits>::fast fast; \
|
||||
public: \
|
||||
SPROUT_STATIC_CONSTEXPR least sig_bits = ~(least(0u)); \
|
||||
SPROUT_STATIC_CONSTEXPR fast sig_bits_fast = fast(sig_bits); \
|
||||
|
|
|
@ -16,6 +16,30 @@
|
|||
|
||||
namespace sprout {
|
||||
namespace detail {
|
||||
//
|
||||
// int_digits_mf
|
||||
//
|
||||
template<typename IntType, IntType Val, int Base = 10, bool = Val != 0>
|
||||
struct int_digits_mf_impl;
|
||||
template<typename IntType, IntType Val, int Base>
|
||||
struct int_digits_mf_impl<IntType, Val, Base, false>
|
||||
: public sprout::integral_constant<IntType, 0>
|
||||
{};
|
||||
template<typename IntType, IntType Val, int Base>
|
||||
struct int_digits_mf_impl<IntType, Val, Base, true>
|
||||
: public sprout::integral_constant<IntType, 1 + sprout::detail::int_digits_mf_impl<IntType, Val / Base, Base>::value>
|
||||
{};
|
||||
template<typename IntType, IntType Val, int Base = 10, bool = Val != 0>
|
||||
struct int_digits_mf;
|
||||
template<typename IntType, IntType Val, int Base>
|
||||
struct int_digits_mf<IntType, Val, Base, false>
|
||||
: public sprout::integral_constant<IntType, 1>
|
||||
{};
|
||||
template<typename IntType, IntType Val, int Base>
|
||||
struct int_digits_mf<IntType, Val, Base, true>
|
||||
: public sprout::integral_constant<IntType, 1 + sprout::detail::int_digits_mf_impl<IntType, Val / Base, Base>::value>
|
||||
{};
|
||||
|
||||
//
|
||||
// int_pow
|
||||
//
|
||||
|
|
|
@ -9,17 +9,7 @@
|
|||
#define SPROUT_DETAIL_PREDEF_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
|
||||
//
|
||||
// SPROUT_VERSION_NUMBER
|
||||
//
|
||||
#define SPROUT_VERSION_NUMBER(MAJOR, MINOR, PATCH) \
|
||||
((((MAJOR) % 100) * 10000000) + (((MINOR) % 100) * 100000) + ((PATCH) % 100000))
|
||||
//
|
||||
// SPROUT_VERSION_NUMBER_ZERO
|
||||
//
|
||||
#define SPROUT_VERSION_NUMBER_ZERO \
|
||||
SPROUT_VERSION_NUMBER(0, 0, 0)
|
||||
#include <sprout/predef/version_number.hpp>
|
||||
|
||||
//
|
||||
// SPROUT_AVAILABLE_GCC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue