Go to the documentation of this file.
25 template <
typename T>
auto unwrap(
const T& v) ->
const T& {
return v; }
27 auto unwrap(
const std::reference_wrapper<T>& v) ->
const T& {
28 return static_cast<const T&
>(v);
35 template <
typename =
void>
struct node {
36 virtual ~node() =
default;
37 std::unique_ptr<node<>>
next;
43 template <
typename Arg>
46 template <
typename Char>
54 template <
typename T,
typename Arg>
auto push(
const Arg&
arg) ->
const T& {
74 template <
typename Context>
90 std::is_same<T, basic_string_view<char_type>>::value ||
91 std::is_same<T, detail::std_string_view<char_type>>::value ||
100 std::is_convertible<T, std::basic_string<char_type>>::value &&
102 std::basic_string<char_type>, T>;
105 std::vector<basic_format_arg<Context>>
data_;
122 return named_info_.empty() ? data_.data() : data_.data() + 1;
126 data_.emplace_back(detail::make_arg<Context>(
arg));
129 template <
typename T>
131 if (named_info_.empty()) {
133 data_.insert(data_.begin(), {zero_ptr, 0});
136 auto pop_one = [](std::vector<basic_format_arg<Context>>*
data) {
139 std::unique_ptr<std::vector<basic_format_arg<Context>>, decltype(pop_one)>
140 guard{&data_, pop_one};
141 named_info_.push_back({
arg.name,
static_cast<int>(data_.size() - 2u)});
142 data_[0].value_.named_args = {named_info_.data(), named_info_.size()};
191 "objects of built-in types and string views are always copied");
192 emplace_arg(
arg.get());
200 template <
typename T>
203 dynamic_args_.
push<std::basic_string<char_type>>(
arg.name).c_str();
225 void reserve(
size_t new_cap,
size_t new_cap_named) {
227 "Set of arguments includes set of named arguments");
228 data_.reserve(new_cap);
229 named_info_.reserve(new_cap_named);
235 #endif // FMT_ARGS_H_
FMT_CONSTEXPR typed_node(const basic_string_view< Char > &arg)
std::unique_ptr< node<> > head_
auto arg(const Char *name, const T &arg) -> detail::named_arg< Char, T >
integral_constant< bool, false > false_type
std::unique_ptr< node<> > next
integral_constant< bool, true > true_type
auto unwrap(const T &v) -> const T &
span_constexpr std::size_t size(span< T, Extent > const &spn)
#define FMT_END_NAMESPACE
const T & move(const T &v)
#define FMT_ASSERT(condition, message)
auto push(const Arg &arg) -> const T &
constexpr FMT_INLINE value()
FMT_CONSTEXPR typed_node(const Arg &arg)
#define FMT_BEGIN_NAMESPACE
typename std::conditional< B, T, F >::type conditional_t
constexpr FMT_INLINE auto const_check(T value) -> T
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:43