@@ -808,7 +808,7 @@ FMT_CONSTEXPR bool is_supported_floating_point(T) {
808808// represent all values of an integral type T.
809809template <typename T>
810810using uint32_or_64_or_128_t =
811- conditional_t <num_bits<T>() <= 32 && ! FMT_REDUCE_INT_INSTANTIATIONS,
811+ conditional_t <num_bits<T>() <= 32 && FMT_REDUCE_INT_INSTANTIATIONS == 0 ,
812812 uint32_t ,
813813 conditional_t <num_bits<T>() <= 64 , uint64_t , uint128_t >>;
814814
@@ -1411,8 +1411,8 @@ FMT_CONSTEXPR float_specs parse_float_type_spec(
14111411template <typename Char, typename Handler>
14121412FMT_CONSTEXPR void handle_char_specs (const basic_format_specs<Char>* specs,
14131413 Handler&& handler) {
1414- if (! specs) return handler.on_char ();
1415- if (specs->type && specs->type != ' c' ) return handler.on_int ();
1414+ if (specs == nullptr ) return handler.on_char ();
1415+ if (specs->type != 0 && specs->type != ' c' ) return handler.on_int ();
14161416 if (specs->align == align::numeric || specs->sign != sign::none || specs->alt )
14171417 handler.on_error (" invalid format specifier for char" );
14181418 handler.on_char ();
@@ -1665,7 +1665,7 @@ template <typename OutputIt, typename Char, typename UInt> struct int_writer {
16651665 std::string groups = grouping<Char>(locale);
16661666 if (groups.empty ()) return on_dec ();
16671667 auto sep = thousands_sep<Char>(locale);
1668- if (! sep) return on_dec ();
1668+ if (sep == 0 ) return on_dec ();
16691669 int num_digits = count_digits (abs_value);
16701670 int size = num_digits, n = num_digits;
16711671 std::string::const_iterator group = groups.cbegin ();
@@ -1762,7 +1762,7 @@ template <typename Char, typename UInt,
17621762inline Char* write_significand (Char* out, UInt significand,
17631763 int significand_size, int integral_size,
17641764 Char decimal_point) {
1765- if (! decimal_point)
1765+ if (decimal_point == 0 )
17661766 return format_decimal (out, significand, significand_size).end ;
17671767 auto end = format_decimal (out + 1 , significand, significand_size).end ;
17681768 if (integral_size == 1 )
@@ -1790,7 +1790,7 @@ inline OutputIt write_significand(OutputIt out, const char* significand,
17901790 int significand_size, int integral_size,
17911791 Char decimal_point) {
17921792 out = detail::copy_str<Char>(significand, significand + integral_size, out);
1793- if (! decimal_point) return out;
1793+ if (decimal_point == 0 ) return out;
17941794 *out++ = decimal_point;
17951795 return detail::copy_str<Char>(significand + integral_size,
17961796 significand + significand_size, out);
@@ -1910,7 +1910,7 @@ OutputIt write(OutputIt out, T value, basic_format_specs<Char> specs,
19101910 if (!std::isfinite (value))
19111911 return write_nonfinite (out, std::isinf (value), specs, fspecs);
19121912
1913- if (specs.align == align::numeric && fspecs.sign ) {
1913+ if (specs.align == align::numeric && fspecs.sign != 0 ) {
19141914 auto it = reserve (out, 1 );
19151915 *it++ = static_cast <Char>(data::signs[fspecs.sign ]);
19161916 out = base_iterator (out, it);
@@ -1924,7 +1924,7 @@ OutputIt write(OutputIt out, T value, basic_format_specs<Char> specs,
19241924 snprintf_float (promote_float (value), specs.precision , fspecs, buffer);
19251925 return write_bytes (out, {buffer.data (), buffer.size ()}, specs);
19261926 }
1927- int precision = specs.precision >= 0 || ! specs.type ? specs.precision : 6 ;
1927+ int precision = specs.precision >= 0 || specs.type == 0 ? specs.precision : 6 ;
19281928 if (fspecs.format == float_format::exp) {
19291929 if (precision == max_value<int >())
19301930 FMT_THROW (format_error (" number is too big" ));
@@ -2066,7 +2066,7 @@ OutputIt write(OutputIt out, Char value) {
20662066
20672067template <typename Char, typename OutputIt>
20682068OutputIt write (OutputIt out, const Char* value) {
2069- if (! value) {
2069+ if (value == nullptr ) {
20702070 FMT_THROW (format_error (" string pointer is null" ));
20712071 } else {
20722072 auto length = std::char_traits<Char>::length (value);
@@ -2225,7 +2225,7 @@ class arg_formatter_base {
22252225 }
22262226
22272227 void write (const Char* value) {
2228- if (! value) {
2228+ if (value == nullptr ) {
22292229 FMT_THROW (format_error (" string pointer is null" ));
22302230 } else {
22312231 auto length = std::char_traits<char_type>::length (value);
@@ -2259,7 +2259,7 @@ class arg_formatter_base {
22592259 }
22602260
22612261 iterator operator ()(bool value) {
2262- if (specs_ && specs_->type ) return (*this )(value ? 1 : 0 );
2262+ if (specs_ != nullptr && specs_->type != 0 ) return (*this )(value ? 1 : 0 );
22632263 write (value != 0 );
22642264 return out_;
22652265 }
@@ -2275,7 +2275,7 @@ class arg_formatter_base {
22752275 }
22762276
22772277 iterator operator ()(const Char* value) {
2278- if (! specs_) return write (value), out_;
2278+ if (specs_ == nullptr ) return write (value), out_;
22792279 handle_cstring_type_spec (specs_->type , cstring_spec_handler (*this , value));
22802280 return out_;
22812281 }
@@ -2773,7 +2773,7 @@ FMT_CONSTEXPR int code_point_length(const Char* begin) {
27732773 // Compute the pointer to the next character early so that the next
27742774 // iteration can start working on the next character. Neither Clang
27752775 // nor GCC figure out this reordering on their own.
2776- return len + ! len;
2776+ return len + ( int )( len == 0 ) ;
27772777}
27782778
27792779template <typename Char> constexpr bool is_ascii_letter (Char c) {
0 commit comments