tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
vformat_to.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2023 Tobias Hienzsch
3
4#ifndef TETL_FORMAT_VFORMAT_TO_HPP
5#define TETL_FORMAT_VFORMAT_TO_HPP
6
7#include <etl/_format/basic_format_args.hpp>
8#include <etl/_format/basic_format_context.hpp>
9#include <etl/_iterator/back_insert_iterator.hpp>
10#include <etl/_string_view/basic_string_view.hpp>
11#include <etl/_utility/ignore_unused.hpp>
12
13namespace etl {
14
15template <typename OutputIt>
16auto vformat_to(OutputIt out, string_view fmt, format_args args) -> OutputIt
17{
18 auto buffer = etl::detail::fmt_buffer<char>{out};
19 auto it = etl::back_inserter(buffer);
20 etl::ignore_unused(fmt, args, it);
21 return out;
22}
23
24} // namespace etl
25
26#endif // TETL_FORMAT_VFORMAT_TO_HPP
Definition adjacent_find.hpp:9
auto vformat_to(OutputIt out, string_view fmt, format_args args) -> OutputIt
Definition vformat_to.hpp:16
constexpr auto ignore_unused(Types &&...) -> void
Explicitly ignore arguments or variables.
Definition ignore_unused.hpp:18
constexpr auto back_inserter(Container &container) -> back_insert_iterator< Container >
back_inserter is a convenience function template that constructs a back_insert_iterator for the conta...
Definition back_insert_iterator.hpp:86