Agora
1.2.0
Agora project
|
Go to the documentation of this file.
22 template <
typename T,
typename Char,
typename Enable =
void>
27 ->
bool_constant<
sizeof(std::declval<std::basic_ostream<Char>&>()
28 << std::declval<U>()) != 0>;
30 template <
typename>
static auto test(...) -> std::false_type;
42 template <
typename T,
typename Char>
48 std::is_same<T, std::basic_string<Char>>
::value ||
49 std::is_same<T, std_string_view<Char>>
::value ||
50 (std::is_convertible<T, int>::value && !std::is_enum<T>::value)>>
55 template <
typename Char>
57 const Char* buf_data = buf.
data();
59 unsigned_streamsize
size = buf.
size();
60 unsigned_streamsize max_size =
to_unsigned(max_value<std::streamsize>());
62 unsigned_streamsize
n =
size <= max_size ?
size : max_size;
63 os.write(buf_data,
static_cast<std::streamsize
>(
n));
69 template <
typename Char,
typename T>
73 auto&& output = std::basic_ostream<Char>(&format_buf);
74 #if !defined(FMT_STATIC_THOUSANDS_SEPARATOR)
75 if (loc) output.imbue(loc.get<std::locale>());
78 output.exceptions(std::ios_base::failbit | std::ios_base::badbit);
83 template <
typename T,
typename Char>
85 :
private formatter<basic_string_view<Char>, Char> {
88 template <
typename OutputIt>
98 template <
typename OutputIt>
109 template <
typename Char>
127 template <
typename S,
typename... Args,
129 void print(std::basic_ostream<Char>& os,
const S& format_str, Args&&... args) {
131 fmt::make_args_checked<Args...>(format_str, args...));
135 #endif // FMT_OSTREAM_H_
const SPDLOG_INLINE string_view_t & to_string_view(spdlog::level::level_enum l) SPDLOG_NOEXCEPT
Definition: common-inl.h:23
typename detail::char_t_impl< S >::type char_t
Definition: core.h:623
end IFFT Reshape the symbol vector into two different spatial streams size
Definition: generate_data.m:73
GeneratorWrapper< T > value(T &&value)
Definition: catch.hpp:3999
constexpr auto size() const -> size_t
Definition: core.h:820
void format_value(buffer< Char > &buf, const T &value, locale_ref loc=locale_ref())
Definition: ostream.h:70
std::integral_constant< bool, B > bool_constant
Definition: core.h:324
#define FMT_END_NAMESPACE
Definition: core.h:240
void print(std::basic_ostream< Char > &os, const S &format_str, Args &&... args)
Definition: ostream.h:129
auto begin() -> T *
Definition: core.h:813
#define FMT_MODULE_EXPORT
Definition: core.h:246
void vprint(std::basic_ostream< Char > &os, basic_string_view< Char > format_str, basic_format_args< buffer_context< type_identity_t< Char >>> args)
Definition: ostream.h:110
void write_buffer(std::basic_ostream< Char > &os, buffer< Char > &buf)
Definition: ostream.h:56
auto end() -> T *
Definition: core.h:814
void vformat_to(buffer< Char > &buf, const text_style &ts, basic_string_view< Char > format_str, basic_format_args< buffer_context< type_identity_t< Char >>> args)
Definition: color.h:502
auto data() -> T *
Definition: core.h:826
Definition: json.hpp:5213
OutputIterator copy(const RangeT &range, OutputIterator out)
Definition: ranges.h:26
#define FMT_BEGIN_NAMESPACE
Definition: core.h:237
typename type_identity< T >::type type_identity_t
Definition: core.h:332
decltype(test< T >(0)) result
Definition: ostream.h:32
typename std::enable_if< B, T >::type enable_if_t
Definition: core.h:321
void try_resize(size_t count)
Definition: core.h:836
auto to_unsigned(Int value) -> typename std::make_unsigned< Int >::type
Definition: core.h:424
std::string format(const T &value)
Definition: utils.h:15
type
Definition: core.h:1131