31 #include "details/fmt_impl_char_type.hpp" 32 #include "details/fmt_impl_cstr_type.hpp" 33 #include "details/fmt_impl_bool.hpp" 34 #include "details/fmt_impl_integral.hpp" 35 #include "details/fmt_impl_null_pointer.hpp" 36 #include "details/fmt_impl_void_pointer.hpp" 38 #include "details/out.hpp" 347 : m_ops{ops}, m_val{val}
365 : m_ops{ops}, m_val{val}
368 if (width > max_width) {
369 width = max_width - 1U;
372 m_ops.set_width(width);
426 template<
typename T,
typename U>
427 friend constexpr out<T>
428 operator<<(out<T>
const o, fmt<U> &&arg) noexcept;
446 template<
typename T,
typename U>
447 [[maybe_unused]] constexpr out<T>
448 operator<<(out<T>
const o,
fmt<U> &&arg) noexcept
450 if constexpr (o.empty()) {
454 fmt_impl(o, arg.m_ops, arg.m_val);
480 [[maybe_unused]] constexpr out<T>
481 operator<<(out<T>
const o, U
const &arg) noexcept
483 if constexpr (o.empty()) {
constexpr fmt(fmt_options const &ops, V const &val) noexcept
Creates a bsl::fmt, which when passed to an outputter will output the provided value given the provid...
Definition: fmt.hpp:346
typename enable_if< B, T >::type enable_if_t
a helper that reduces the verbosity of bsl::enable_if
Definition: enable_if.hpp:52
The bsl::fmt implements a similar syntax to that of std::format, We adopt a similar approach with som...
Definition: fmt.hpp:328
Used by fmt to determine how to format the output of an fmt command. See the documentation fo bsl::fm...
Definition: fmt_options.hpp:141
char const * cstr_type
C-style string type.
Definition: cstr_type.hpp:39
constexpr fmt_options nullops
defines no formatting.
Definition: fmt_options.hpp:648
constexpr fmt(cstr_type const str, V const &val) noexcept
Creates a bsl::fmt, which when passed to an outputter will output the provided value given the provid...
Definition: fmt.hpp:385
constexpr fmt(fmt_options const &ops, V const &val, bsl::uintmax width) noexcept
Creates a bsl::fmt, which when passed to an outputter will output the provided value given the provid...
Definition: fmt.hpp:364
constexpr fmt(cstr_type const str, V const &val, bsl::uintmax const width) noexcept
Creates a bsl::fmt, which when passed to an outputter will output the provided value given the provid...
Definition: fmt.hpp:403
friend constexpr out< T > operator<<(out< T > const o, fmt< U > &&arg) noexcept
Outputs the provided formatted argument to the provided output type.
::uintmax_t uintmax
defines a unsigned integer with the maximum possible size
Definition: cstdint.hpp:97