Make constexpr precede explicit consistently

This commit is contained in:
Victor Zverovich
2024-11-02 11:03:03 -07:00
parent e3d3b24fc1
commit 8523dba2dc
5 changed files with 14 additions and 14 deletions

View File

@@ -853,7 +853,7 @@ template <typename Char = char> class parse_context {
using char_type = Char;
using iterator = const Char*;
explicit constexpr parse_context(basic_string_view<Char> fmt,
constexpr explicit parse_context(basic_string_view<Char> fmt,
int next_arg_id = 0)
: fmt_(fmt), next_arg_id_(next_arg_id) {}
@@ -1191,7 +1191,7 @@ class compile_parse_context : public parse_context<Char> {
using base = parse_context<Char>;
public:
explicit FMT_CONSTEXPR compile_parse_context(basic_string_view<Char> fmt,
FMT_CONSTEXPR explicit compile_parse_context(basic_string_view<Char> fmt,
int num_args, const type* types,
int next_arg_id = 0)
: base(fmt, next_arg_id), num_args_(num_args), types_(types) {}
@@ -1647,7 +1647,7 @@ class format_string_checker {
public:
template <typename... T>
explicit FMT_CONSTEXPR format_string_checker(basic_string_view<Char> fmt,
FMT_CONSTEXPR explicit format_string_checker(basic_string_view<Char> fmt,
arg_pack<T...>)
: types_{mapped_type_constant<T, Char>::value...},
named_args_{},

View File

@@ -45,7 +45,7 @@ struct is_compiled_string : std::is_base_of<compiled_string, S> {};
template <typename Char, size_t N, fmt::detail::fixed_string<Char, N> Str>
struct udl_compiled_string : compiled_string {
using char_type = Char;
explicit constexpr operator basic_string_view<char_type>() const {
constexpr explicit operator basic_string_view<char_type>() const {
return {Str.data, N - 1};
}
};

View File

@@ -4039,16 +4039,16 @@ class format_int {
}
public:
explicit FMT_CONSTEXPR20 format_int(int value) : str_(format_signed(value)) {}
explicit FMT_CONSTEXPR20 format_int(long value)
FMT_CONSTEXPR20 explicit format_int(int value) : str_(format_signed(value)) {}
FMT_CONSTEXPR20 explicit format_int(long value)
: str_(format_signed(value)) {}
explicit FMT_CONSTEXPR20 format_int(long long value)
FMT_CONSTEXPR20 explicit format_int(long long value)
: str_(format_signed(value)) {}
explicit FMT_CONSTEXPR20 format_int(unsigned value)
FMT_CONSTEXPR20 explicit format_int(unsigned value)
: str_(format_unsigned(value)) {}
explicit FMT_CONSTEXPR20 format_int(unsigned long value)
FMT_CONSTEXPR20 explicit format_int(unsigned long value)
: str_(format_unsigned(value)) {}
explicit FMT_CONSTEXPR20 format_int(unsigned long long value)
FMT_CONSTEXPR20 explicit format_int(unsigned long long value)
: str_(format_unsigned(value)) {}
/// Returns the number of characters written to the output buffer.