MCPcopy Create free account
hub / github.com/fmtlib/fmt / operator()

Method operator()

include/fmt/printf.h:204–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202
203 template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
204 auto operator()(T value) -> unsigned {
205 auto width = static_cast<uint32_or_64_or_128_t<T>>(value);
206 if (detail::is_negative(value)) {
207 specs_.set_align(align::left);
208 width = 0 - width;
209 }
210 unsigned int_max = to_unsigned(max_value<int>());
211 if (width > int_max) report_error("number is too big");
212 return static_cast<unsigned>(width);
213 }
214
215 template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
216 auto operator()(T) -> unsigned {

Callers

nothing calls this directly

Calls 4

is_negativeFunction · 0.85
to_unsignedFunction · 0.85
report_errorFunction · 0.85
set_alignMethod · 0.80

Tested by

no test coverage detected