From c22735b21287ae2235fdb206e324d119aab36f4c Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Fri, 9 Aug 2013 20:04:27 +0900 Subject: [PATCH] fix warning: for clang --- sprout/detail/math/int.hpp | 12 +++++++++++- sprout/string/concat.hpp | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sprout/detail/math/int.hpp b/sprout/detail/math/int.hpp index 47b06e91..272f571b 100644 --- a/sprout/detail/math/int.hpp +++ b/sprout/detail/math/int.hpp @@ -11,6 +11,8 @@ #include #include #include +#include +#include namespace sprout { namespace detail { @@ -54,7 +56,7 @@ namespace sprout { // template< int Base = 10, typename IntType, - typename sprout::enabler_if::value>::type = sprout::enabler + typename sprout::enabler_if::value>::type = sprout::enabler > inline SPROUT_CONSTEXPR int int_digit_at(IntType val, int digits) { @@ -62,6 +64,14 @@ namespace sprout { : (val / sprout::detail::int_pow(digits)) % Base ; } + template< + int Base = 10, typename IntType, + typename sprout::enabler_if::value>::type = sprout::enabler + > + inline SPROUT_CONSTEXPR int + int_digit_at(IntType val, int digits) { + return (val / sprout::detail::int_pow(digits)) % Base; + } } // namespace detail } // namespace sprout diff --git a/sprout/string/concat.hpp b/sprout/string/concat.hpp index bb82484d..03474205 100644 --- a/sprout/string/concat.hpp +++ b/sprout/string/concat.hpp @@ -79,7 +79,7 @@ namespace sprout { typedef sprout::detail::string_construct_access access_type; return access_type::raw_construct( lsize + rsize, - (Indexes < lsize ? lhs[Indexes] + (Indexes < lsize ? *(lhs + Indexes) : Indexes < lsize + rsize ? rhs[Indexes - lsize] : T() )...