mirror of
https://github.com/fmtlib/fmt.git
synced 2024-10-02 21:12:05 +00:00
Relax constexpr requirements
This commit is contained in:
parent
1f57243b49
commit
5c7474e1fb
@ -50,10 +50,10 @@
|
|||||||
#endif
|
#endif
|
||||||
#if FMT_USE_CONSTEXPR
|
#if FMT_USE_CONSTEXPR
|
||||||
# define FMT_CONSTEXPR constexpr
|
# define FMT_CONSTEXPR constexpr
|
||||||
# define FMT_CONSTEXPR_VAR constexpr
|
# define FMT_CONSTEXPR_DECL constexpr
|
||||||
#else
|
#else
|
||||||
# define FMT_CONSTEXPR inline
|
# define FMT_CONSTEXPR inline
|
||||||
# define FMT_CONSTEXPR_VAR
|
# define FMT_CONSTEXPR_DECL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FMT_OVERRIDE
|
#ifndef FMT_OVERRIDE
|
||||||
|
@ -636,7 +636,7 @@ class null_terminating_iterator {
|
|||||||
return ptr_ >= other.ptr_;
|
return ptr_ >= other.ptr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
friend FMT_CONSTEXPR const Char *pointer_from<Char>(
|
friend FMT_CONSTEXPR_DECL const Char *pointer_from<Char>(
|
||||||
null_terminating_iterator it);
|
null_terminating_iterator it);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -3216,7 +3216,7 @@ template <typename String, typename... Args>
|
|||||||
inline typename std::enable_if<
|
inline typename std::enable_if<
|
||||||
std::is_base_of<internal::format_string, String>::value, std::string>::type
|
std::is_base_of<internal::format_string, String>::value, std::string>::type
|
||||||
format(String format_str, const Args & ... args) {
|
format(String format_str, const Args & ... args) {
|
||||||
FMT_CONSTEXPR_VAR bool invalid_format =
|
FMT_CONSTEXPR_DECL bool invalid_format =
|
||||||
internal::check_format_string<char, internal::error_handler, Args...>(
|
internal::check_format_string<char, internal::error_handler, Args...>(
|
||||||
string_view(format_str.value(), format_str.size()));
|
string_view(format_str.value(), format_str.size()));
|
||||||
(void)invalid_format;
|
(void)invalid_format;
|
||||||
@ -3243,8 +3243,8 @@ class udl_formatter {
|
|||||||
public:
|
public:
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
std::basic_string<Char> operator()(const Args &... args) const {
|
std::basic_string<Char> operator()(const Args &... args) const {
|
||||||
FMT_CONSTEXPR_VAR Char s[] = {CHARS..., '\0'};
|
FMT_CONSTEXPR_DECL Char s[] = {CHARS..., '\0'};
|
||||||
FMT_CONSTEXPR_VAR bool invalid_format =
|
FMT_CONSTEXPR_DECL bool invalid_format =
|
||||||
check_format_string<Char, error_handler, Args...>(
|
check_format_string<Char, error_handler, Args...>(
|
||||||
basic_string_view<Char>(s, sizeof...(CHARS)));
|
basic_string_view<Char>(s, sizeof...(CHARS)));
|
||||||
(void)invalid_format;
|
(void)invalid_format;
|
||||||
|
Loading…
Reference in New Issue
Block a user