Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -1031,14 +1031,14 @@ constexpr auto in(type t, int set) -> bool {

// Bitsets of types.
enum {
sint_set =
set(type::int_type) | set(type::long_long_type) | set(type::int128_type),
sint_set = set(type::int_type) | set(type::long_long_type) |
set(type::int128_type),
uint_set = set(type::uint_type) | set(type::ulong_long_type) |
set(type::uint128_type),
set(type::uint128_type),
bool_set = set(type::bool_type),
char_set = set(type::char_type),
float_set = set(type::float_type) | set(type::double_type) |
set(type::long_double_type),
set(type::long_double_type),
string_set = set(type::string_type),
cstring_set = set(type::cstring_type),
pointer_set = set(type::pointer_type)
Expand Down Expand Up @@ -2685,7 +2685,9 @@ template <typename Char = char> struct runtime_format_string {
* // Check format string at runtime instead of compile-time.
* fmt::print(fmt::runtime("{:d}"), "I am not a number");
*/
inline auto runtime(string_view s) -> runtime_format_string<> { return {{s}}; }
inline auto runtime(string_view s) -> runtime_format_string<> {
return {{s}};
}

/// A compile-time format string. Use `format_string` in the public API to
/// prevent type deduction.
Expand Down
8 changes: 4 additions & 4 deletions include/fmt/fmt-c.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ typedef enum {} fmt_signed_char;
(fmt_arg[]) { FMT_MAP(FMT_MAKE_ARG, ##__VA_ARGS__) }
# define FMT_EXPAND(v) v

# define FMT_FORMAT_ARGS(fmt, ...) \
(fmt), \
FMT_EXPAND(FMT_VA_SELECT(FMT_MAKE_NULL, FMT_MAKE_ARGLIST, \
##__VA_ARGS__)(__VA_ARGS__)), \
# define FMT_FORMAT_ARGS(fmt, ...) \
(fmt), \
FMT_EXPAND(FMT_VA_SELECT( \
FMT_MAKE_NULL, FMT_MAKE_ARGLIST, ##__VA_ARGS__)(__VA_ARGS__)), \
FMT_NARG(, ##__VA_ARGS__)

# define fmt_format(buffer, size, fmt, ...) \
Expand Down
4 changes: 2 additions & 2 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -2007,7 +2007,7 @@ auto write_int(OutputIt out, UInt value, unsigned prefix,
int num_digits = 0;
auto buffer = memory_buffer();
switch (specs.type()) {
default: FMT_ASSERT(false, ""); FMT_FALLTHROUGH;
default: FMT_ASSERT(false, ""); FMT_FALLTHROUGH;
case presentation_type::none:
case presentation_type::dec:
num_digits = count_digits(value);
Expand Down Expand Up @@ -2136,7 +2136,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg,
auto abs_value = arg.abs_value;
auto prefix = arg.prefix;
switch (specs.type()) {
default: FMT_ASSERT(false, ""); FMT_FALLTHROUGH;
default: FMT_ASSERT(false, ""); FMT_FALLTHROUGH;
case presentation_type::none:
case presentation_type::dec:
begin = do_format_decimal(buffer, abs_value, buffer_size);
Expand Down
Loading