mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-12-23 21:25:49 +00:00
fix warning: for clang
This commit is contained in:
parent
baf8995e81
commit
c22735b212
2 changed files with 12 additions and 2 deletions
|
@ -11,6 +11,8 @@
|
|||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/type_traits/enabler_if.hpp>
|
||||
#include <sprout/type_traits/is_int.hpp>
|
||||
#include <sprout/type_traits/is_uint.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace detail {
|
||||
|
@ -54,7 +56,7 @@ namespace sprout {
|
|||
//
|
||||
template<
|
||||
int Base = 10, typename IntType,
|
||||
typename sprout::enabler_if<std::is_integral<IntType>::value>::type = sprout::enabler
|
||||
typename sprout::enabler_if<sprout::is_int<IntType>::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<IntType, Base>(digits)) % Base
|
||||
;
|
||||
}
|
||||
template<
|
||||
int Base = 10, typename IntType,
|
||||
typename sprout::enabler_if<sprout::is_uint<IntType>::value>::type = sprout::enabler
|
||||
>
|
||||
inline SPROUT_CONSTEXPR int
|
||||
int_digit_at(IntType val, int digits) {
|
||||
return (val / sprout::detail::int_pow<IntType, Base>(digits)) % Base;
|
||||
}
|
||||
} // namespace detail
|
||||
} // namespace sprout
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace sprout {
|
|||
typedef sprout::detail::string_construct_access<T, (M - 1) + N, Traits> access_type;
|
||||
return access_type::raw_construct(
|
||||
lsize + rsize,
|
||||
(Indexes < lsize ? lhs[Indexes]
|
||||
(Indexes < lsize ? *(lhs + Indexes)
|
||||
: Indexes < lsize + rsize ? rhs[Indexes - lsize]
|
||||
: T()
|
||||
)...
|
||||
|
|
Loading…
Reference in a new issue