tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
basic_format_args.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_FORMAT_BASIC_FORMAT_ARGS_HPP
4#define TETL_FORMAT_BASIC_FORMAT_ARGS_HPP
5
10#include <etl/_span/span.hpp>
11
12namespace etl {
13
14template <typename Context>
16 constexpr basic_format_args() noexcept = default;
17
18 template <typename... Args>
19 constexpr basic_format_args(detail::format_arg_store<Context, Args...> const& store) noexcept
20 : _args{store.args}
21 {
22 }
23
24 [[nodiscard]] constexpr auto get(size_t i) const noexcept -> basic_format_arg<Context>
25 {
26 if (i >= _args.size()) {
28 }
29 return _args[i];
30 }
31
32private:
34};
35
38
39} // namespace etl
40
41#endif // TETL_FORMAT_BASIC_FORMAT_ARGS_HPP
Definition adjacent_find.hpp:8
basic_format_args< format_context > format_args
Definition basic_format_args.hpp:36
basic_format_args< wformat_context > wformat_args
Definition basic_format_args.hpp:37
Definition basic_format_arg.hpp:25
Definition basic_format_args.hpp:15
constexpr basic_format_args() noexcept=default
constexpr auto get(size_t i) const noexcept -> basic_format_arg< Context >
Definition basic_format_args.hpp:24
A non-owning view over a contiguous sequence of objects.
Definition span.hpp:83