mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-12-23 21:25:49 +00:00
fix link error in VC++
This commit is contained in:
parent
cb801ffef8
commit
8e24d4551c
7 changed files with 47 additions and 30 deletions
|
@ -18,33 +18,34 @@
|
|||
//
|
||||
#if SPROUT_USE_UNICODE_LITERALS
|
||||
# define SPROUT_LITERAL_STRING_DEF(NAME, STRING, LENGTH) \
|
||||
template<typename Elem> \
|
||||
template<typename Elem, typename X = void> \
|
||||
struct NAME; \
|
||||
SPROUT_LITERAL_STRING_DEF_IMPL(NAME, STRING, LENGTH, char); \
|
||||
SPROUT_LITERAL_STRING_DEF_IMPL(NAME, SPROUT_PP_CAT(L, STRING), LENGTH, wchar_t); \
|
||||
SPROUT_LITERAL_STRING_DEF_IMPL(NAME, SPROUT_PP_CAT(u, STRING), LENGTH, char16_t); \
|
||||
SPROUT_LITERAL_STRING_DEF_IMPL(NAME, SPROUT_PP_CAT(U, STRING), LENGTH, char32_t); \
|
||||
template<typename Elem> \
|
||||
template<typename Elem, typename X> \
|
||||
struct NAME {}
|
||||
#else
|
||||
# define SPROUT_LITERAL_STRING_DEF(NAME, STRING, LENGTH) \
|
||||
template<typename Elem> \
|
||||
template<typename Elem, typename X = void> \
|
||||
struct NAME; \
|
||||
SPROUT_LITERAL_STRING_DEF_IMPL(NAME, STRING, LENGTH, char); \
|
||||
SPROUT_LITERAL_STRING_DEF_IMPL(NAME, SPROUT_PP_CAT(L, STRING), LENGTH, wchar_t); \
|
||||
template<typename Elem> \
|
||||
template<typename Elem, typename X> \
|
||||
struct NAME {}
|
||||
#endif
|
||||
#define SPROUT_LITERAL_STRING_DEF_IMPL(NAME, STRING, LENGTH, ELEM) \
|
||||
template<> \
|
||||
struct NAME<ELEM> { \
|
||||
template<typename X> \
|
||||
struct NAME<ELEM, X> { \
|
||||
public: \
|
||||
SPROUT_STATIC_CONSTEXPR sprout::basic_string<ELEM, LENGTH> value \
|
||||
SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(STRING) \
|
||||
SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(sprout::to_string(STRING)) \
|
||||
; \
|
||||
}; \
|
||||
SPROUT_CONSTEXPR_OR_CONST sprout::basic_string<ELEM, LENGTH> NAME<ELEM>::value \
|
||||
SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(STRING)
|
||||
template<typename X> \
|
||||
SPROUT_CONSTEXPR_OR_CONST sprout::basic_string<ELEM, LENGTH> NAME<ELEM, X>::value \
|
||||
SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(sprout::to_string(STRING))
|
||||
|
||||
//
|
||||
// SPROUT_LITERAL_CHAR_DEF
|
||||
|
|
|
@ -179,6 +179,10 @@ namespace sprout {
|
|||
;
|
||||
};
|
||||
template<typename X>
|
||||
SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::math::detail::bernoulli_numbers<
|
||||
float, X
|
||||
>::limit;
|
||||
template<typename X>
|
||||
SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::bernoulli_numbers<
|
||||
float, X
|
||||
>::table_type sprout::math::detail::bernoulli_numbers<
|
||||
|
@ -199,6 +203,10 @@ namespace sprout {
|
|||
;
|
||||
};
|
||||
template<typename X>
|
||||
SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::math::detail::bernoulli_numbers<
|
||||
double, X
|
||||
>::limit;
|
||||
template<typename X>
|
||||
SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::bernoulli_numbers<
|
||||
double, X
|
||||
>::table_type sprout::math::detail::bernoulli_numbers<
|
||||
|
@ -219,6 +227,10 @@ namespace sprout {
|
|||
;
|
||||
};
|
||||
template<typename X>
|
||||
SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::math::detail::bernoulli_numbers<
|
||||
long double, X
|
||||
>::limit;
|
||||
template<typename X>
|
||||
SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::bernoulli_numbers<
|
||||
long double, X
|
||||
>::table_type sprout::math::detail::bernoulli_numbers<
|
||||
|
|
|
@ -301,7 +301,7 @@ namespace sprout {
|
|||
}
|
||||
template<sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR std::tuple<Types...>
|
||||
to_std_tuple(sprout::index_tuple<Indexes...>) {
|
||||
to_std_tuple(sprout::index_tuple<Indexes...>) const {
|
||||
return std::tuple<Types...>(base_type::template get<Indexes>(*this)...);
|
||||
}
|
||||
public:
|
||||
|
|
|
@ -22,14 +22,14 @@ namespace sprout {
|
|||
namespace detail {
|
||||
SPROUT_LITERAL_STRING_DEF(bdigits, "01", 2);
|
||||
|
||||
template<typename Dummy>
|
||||
template<typename Dummy, typename X = void>
|
||||
struct bvalues;
|
||||
|
||||
# define SPROUT_WEED_BDIGITS_TABLE_DEF \
|
||||
{{0, 1}}
|
||||
|
||||
template<>
|
||||
struct bvalues<void> {
|
||||
template<typename X>
|
||||
struct bvalues<void, X> {
|
||||
public:
|
||||
typedef sprout::array<std::uint8_t, 2> value_type;
|
||||
public:
|
||||
|
@ -37,8 +37,9 @@ namespace sprout {
|
|||
SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_WEED_BDIGITS_TABLE_DEF)
|
||||
;
|
||||
};
|
||||
SPROUT_CONSTEXPR_OR_CONST sprout::weed::detail::bvalues<void>::value_type
|
||||
sprout::weed::detail::bvalues<void>::value
|
||||
template<typename X>
|
||||
SPROUT_CONSTEXPR_OR_CONST typename sprout::weed::detail::bvalues<void, X>::value_type
|
||||
sprout::weed::detail::bvalues<void, X>::value
|
||||
SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_WEED_BDIGITS_TABLE_DEF)
|
||||
;
|
||||
|
||||
|
|
|
@ -22,14 +22,14 @@ namespace sprout {
|
|||
namespace detail {
|
||||
SPROUT_LITERAL_STRING_DEF(digits, "0123456789", 10);
|
||||
|
||||
template<typename Dummy>
|
||||
template<typename Dummy, typename X = void>
|
||||
struct values;
|
||||
|
||||
# define SPROUT_WEED_DIGITS_TABLE_DEF \
|
||||
{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}}
|
||||
|
||||
template<>
|
||||
struct values<void> {
|
||||
template<typename X>
|
||||
struct values<void, X> {
|
||||
public:
|
||||
typedef sprout::array<std::uint8_t, 10> value_type;
|
||||
public:
|
||||
|
@ -37,8 +37,9 @@ namespace sprout {
|
|||
SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_WEED_DIGITS_TABLE_DEF)
|
||||
;
|
||||
};
|
||||
SPROUT_CONSTEXPR_OR_CONST sprout::weed::detail::values<void>::value_type
|
||||
sprout::weed::detail::values<void>::value
|
||||
template<typename X>
|
||||
SPROUT_CONSTEXPR_OR_CONST typename sprout::weed::detail::values<void, X>::value_type
|
||||
sprout::weed::detail::values<void, X>::value
|
||||
SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_WEED_DIGITS_TABLE_DEF)
|
||||
;
|
||||
|
||||
|
|
|
@ -22,14 +22,14 @@ namespace sprout {
|
|||
namespace detail {
|
||||
SPROUT_LITERAL_STRING_DEF(odigits, "01234567", 8);
|
||||
|
||||
template<typename Dummy>
|
||||
template<typename Dummy, typename X = void>
|
||||
struct ovalues;
|
||||
|
||||
# define SPROUT_WEED_ODIGITS_TABLE_DEF \
|
||||
{{0, 1, 2, 3, 4, 5, 6, 7}}
|
||||
|
||||
template<>
|
||||
struct ovalues<void> {
|
||||
template<typename X>
|
||||
struct ovalues<void, X> {
|
||||
public:
|
||||
typedef sprout::array<std::uint8_t, 8> value_type;
|
||||
public:
|
||||
|
@ -37,8 +37,9 @@ namespace sprout {
|
|||
SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_WEED_ODIGITS_TABLE_DEF)
|
||||
;
|
||||
};
|
||||
SPROUT_CONSTEXPR_OR_CONST sprout::weed::detail::ovalues<void>::value_type
|
||||
sprout::weed::detail::ovalues<void>::value
|
||||
template<typename X>
|
||||
SPROUT_CONSTEXPR_OR_CONST typename sprout::weed::detail::ovalues<void, X>::value_type
|
||||
sprout::weed::detail::ovalues<void, X>::value
|
||||
SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_WEED_ODIGITS_TABLE_DEF)
|
||||
;
|
||||
|
||||
|
|
|
@ -22,14 +22,14 @@ namespace sprout {
|
|||
namespace detail {
|
||||
SPROUT_LITERAL_STRING_DEF(xdigits, "0123456789abcdefABCDEF", 22);
|
||||
|
||||
template<typename Dummy>
|
||||
template<typename Dummy, typename X = void>
|
||||
struct xvalues;
|
||||
|
||||
# define SPROUT_WEED_XDIGITS_TABLE_DEF \
|
||||
{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 10, 11, 12, 13, 14, 15}}
|
||||
|
||||
template<>
|
||||
struct xvalues<void> {
|
||||
template<typename X>
|
||||
struct xvalues<void, X> {
|
||||
public:
|
||||
typedef sprout::array<std::uint8_t, 22> value_type;
|
||||
public:
|
||||
|
@ -37,8 +37,9 @@ namespace sprout {
|
|||
SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_INNER(SPROUT_WEED_XDIGITS_TABLE_DEF)
|
||||
;
|
||||
};
|
||||
SPROUT_CONSTEXPR_OR_CONST sprout::weed::detail::xvalues<void>::value_type
|
||||
sprout::weed::detail::xvalues<void>::value
|
||||
template<typename X>
|
||||
SPROUT_CONSTEXPR_OR_CONST typename sprout::weed::detail::xvalues<void, X>::value_type
|
||||
sprout::weed::detail::xvalues<void, X>::value
|
||||
SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_WEED_XDIGITS_TABLE_DEF)
|
||||
;
|
||||
|
||||
|
|
Loading…
Reference in a new issue