mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-07 17:41:11 +00:00
Optimize format string processing on dumb compilers
This commit is contained in:
parent
59c268a5f8
commit
10c7f89351
@ -283,7 +283,7 @@ class basic_string_view {
|
|||||||
template <typename Alloc>
|
template <typename Alloc>
|
||||||
FMT_CONSTEXPR basic_string_view(
|
FMT_CONSTEXPR basic_string_view(
|
||||||
const std::basic_string<Char, Alloc> &s) FMT_NOEXCEPT
|
const std::basic_string<Char, Alloc> &s) FMT_NOEXCEPT
|
||||||
: data_(s.c_str()), size_(s.size()) {}
|
: data_(s.data()), size_(s.size()) {}
|
||||||
|
|
||||||
FMT_CONSTEXPR basic_string_view(type s) FMT_NOEXCEPT
|
FMT_CONSTEXPR basic_string_view(type s) FMT_NOEXCEPT
|
||||||
: data_(s.data()), size_(s.size()) {}
|
: data_(s.data()), size_(s.size()) {}
|
||||||
@ -1300,8 +1300,8 @@ struct is_compile_string :
|
|||||||
std::integral_constant<bool, std::is_base_of<compile_string, S>::value> {};
|
std::integral_constant<bool, std::is_base_of<compile_string, S>::value> {};
|
||||||
|
|
||||||
template <typename... Args, typename S>
|
template <typename... Args, typename S>
|
||||||
typename std::enable_if<!is_compile_string<S>::value>::type
|
inline typename std::enable_if<!is_compile_string<S>::value>::type
|
||||||
check_format_string(S) {}
|
check_format_string(const S &) {}
|
||||||
template <typename... Args, typename S>
|
template <typename... Args, typename S>
|
||||||
typename std::enable_if<is_compile_string<S>::value>::type
|
typename std::enable_if<is_compile_string<S>::value>::type
|
||||||
check_format_string(S);
|
check_format_string(S);
|
||||||
|
Loading…
Reference in New Issue
Block a user