mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
fix container_traits for pointer type
fix to_string for longer string
This commit is contained in:
parent
dd2b9511eb
commit
73cdad232b
14 changed files with 513 additions and 61 deletions
|
@ -5,21 +5,12 @@
|
|||
#include <sprout/config.hpp>
|
||||
|
||||
namespace sprout {
|
||||
// Copyright (C) 2011 RiSK (sscrisk)
|
||||
|
||||
namespace detail {
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
strlen_impl(char const* s, std::size_t n) {
|
||||
return !*s ? n :
|
||||
sprout::detail::strlen_impl(s + 1, n + 1)
|
||||
;
|
||||
}
|
||||
} // namespace detail
|
||||
|
||||
// 7.21.6.3 strlen ŠÖ<C5A0>”
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
strlen(char const* s) {
|
||||
return sprout::detail::strlen_impl(s, 0);
|
||||
return !*s ? 0
|
||||
: 1 + sprout::strlen(s + 1)
|
||||
;
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue