From 8e24d4551c42ab4702f4d0e6409418dadfecbf7d Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Tue, 8 Mar 2016 18:22:38 +0900 Subject: [PATCH] fix link error in VC++ --- sprout/detail/literal_def.hpp | 19 ++++++++++--------- sprout/math/bernoulli.hpp | 12 ++++++++++++ sprout/tuple/tuple/tuple_decl.hpp | 2 +- sprout/weed/detail/bdigits.hpp | 11 ++++++----- sprout/weed/detail/digits.hpp | 11 ++++++----- sprout/weed/detail/odigits.hpp | 11 ++++++----- sprout/weed/detail/xdigits.hpp | 11 ++++++----- 7 files changed, 47 insertions(+), 30 deletions(-) diff --git a/sprout/detail/literal_def.hpp b/sprout/detail/literal_def.hpp index 39dea32a..1a5bc341 100644 --- a/sprout/detail/literal_def.hpp +++ b/sprout/detail/literal_def.hpp @@ -18,33 +18,34 @@ // #if SPROUT_USE_UNICODE_LITERALS # define SPROUT_LITERAL_STRING_DEF(NAME, STRING, LENGTH) \ - template \ + template \ 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 \ + template \ struct NAME {} #else # define SPROUT_LITERAL_STRING_DEF(NAME, STRING, LENGTH) \ - template \ + template \ 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 \ + template \ struct NAME {} #endif #define SPROUT_LITERAL_STRING_DEF_IMPL(NAME, STRING, LENGTH, ELEM) \ - template<> \ - struct NAME { \ + template \ + struct NAME { \ public: \ SPROUT_STATIC_CONSTEXPR sprout::basic_string 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 NAME::value \ - SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(STRING) + template \ + SPROUT_CONSTEXPR_OR_CONST sprout::basic_string NAME::value \ + SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(sprout::to_string(STRING)) // // SPROUT_LITERAL_CHAR_DEF diff --git a/sprout/math/bernoulli.hpp b/sprout/math/bernoulli.hpp index 413c9d2a..14e843ce 100644 --- a/sprout/math/bernoulli.hpp +++ b/sprout/math/bernoulli.hpp @@ -179,6 +179,10 @@ namespace sprout { ; }; template + SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::math::detail::bernoulli_numbers< + float, X + >::limit; + template 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 + SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::math::detail::bernoulli_numbers< + double, X + >::limit; + template 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 + SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::math::detail::bernoulli_numbers< + long double, X + >::limit; + template SPROUT_CONSTEXPR_OR_CONST typename sprout::math::detail::bernoulli_numbers< long double, X >::table_type sprout::math::detail::bernoulli_numbers< diff --git a/sprout/tuple/tuple/tuple_decl.hpp b/sprout/tuple/tuple/tuple_decl.hpp index 99c96a96..bdab7f13 100644 --- a/sprout/tuple/tuple/tuple_decl.hpp +++ b/sprout/tuple/tuple/tuple_decl.hpp @@ -301,7 +301,7 @@ namespace sprout { } template SPROUT_CONSTEXPR std::tuple - to_std_tuple(sprout::index_tuple) { + to_std_tuple(sprout::index_tuple) const { return std::tuple(base_type::template get(*this)...); } public: diff --git a/sprout/weed/detail/bdigits.hpp b/sprout/weed/detail/bdigits.hpp index ea47ba3e..ea404f43 100644 --- a/sprout/weed/detail/bdigits.hpp +++ b/sprout/weed/detail/bdigits.hpp @@ -22,14 +22,14 @@ namespace sprout { namespace detail { SPROUT_LITERAL_STRING_DEF(bdigits, "01", 2); - template + template struct bvalues; # define SPROUT_WEED_BDIGITS_TABLE_DEF \ {{0, 1}} - template<> - struct bvalues { + template + struct bvalues { public: typedef sprout::array 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::value_type - sprout::weed::detail::bvalues::value + template + SPROUT_CONSTEXPR_OR_CONST typename sprout::weed::detail::bvalues::value_type + sprout::weed::detail::bvalues::value SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_WEED_BDIGITS_TABLE_DEF) ; diff --git a/sprout/weed/detail/digits.hpp b/sprout/weed/detail/digits.hpp index 8b5755e0..0078b900 100644 --- a/sprout/weed/detail/digits.hpp +++ b/sprout/weed/detail/digits.hpp @@ -22,14 +22,14 @@ namespace sprout { namespace detail { SPROUT_LITERAL_STRING_DEF(digits, "0123456789", 10); - template + template struct values; # define SPROUT_WEED_DIGITS_TABLE_DEF \ {{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}} - template<> - struct values { + template + struct values { public: typedef sprout::array 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::value_type - sprout::weed::detail::values::value + template + SPROUT_CONSTEXPR_OR_CONST typename sprout::weed::detail::values::value_type + sprout::weed::detail::values::value SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_WEED_DIGITS_TABLE_DEF) ; diff --git a/sprout/weed/detail/odigits.hpp b/sprout/weed/detail/odigits.hpp index edcf0dc0..d94d7831 100644 --- a/sprout/weed/detail/odigits.hpp +++ b/sprout/weed/detail/odigits.hpp @@ -22,14 +22,14 @@ namespace sprout { namespace detail { SPROUT_LITERAL_STRING_DEF(odigits, "01234567", 8); - template + template struct ovalues; # define SPROUT_WEED_ODIGITS_TABLE_DEF \ {{0, 1, 2, 3, 4, 5, 6, 7}} - template<> - struct ovalues { + template + struct ovalues { public: typedef sprout::array 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::value_type - sprout::weed::detail::ovalues::value + template + SPROUT_CONSTEXPR_OR_CONST typename sprout::weed::detail::ovalues::value_type + sprout::weed::detail::ovalues::value SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_WEED_ODIGITS_TABLE_DEF) ; diff --git a/sprout/weed/detail/xdigits.hpp b/sprout/weed/detail/xdigits.hpp index 6caa1007..52c6c41d 100644 --- a/sprout/weed/detail/xdigits.hpp +++ b/sprout/weed/detail/xdigits.hpp @@ -22,14 +22,14 @@ namespace sprout { namespace detail { SPROUT_LITERAL_STRING_DEF(xdigits, "0123456789abcdefABCDEF", 22); - template + template 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 { + template + struct xvalues { public: typedef sprout::array 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::value_type - sprout::weed::detail::xvalues::value + template + SPROUT_CONSTEXPR_OR_CONST typename sprout::weed::detail::xvalues::value_type + sprout::weed::detail::xvalues::value SPROUT_STATIC_CONSTEXPR_DATA_MEMBER_OUTER(SPROUT_WEED_XDIGITS_TABLE_DEF) ;