basic_format_arg<Context> get(std::size_t i) const noexcept;
概要
i
番目のフォーマット引数を得る。i
が範囲外の場合、basic_format_arg<Context>
のデフォルト値を返す。
例外
投げない。
実装例
namespace std {
template<class Context>
class basic_format_args {
std::size_t size_;
const basic_format_arg<Context>* data_;
public:
basic_format_arg<Context> get(std::size_t i) const noexcept
{
return i < size_ ? data_[i] : basic_format_arg<Context>();
}
};
}
バージョン
言語
- C++20
処理系
- Clang: ??
- GCC: ??
- ICC: ??
- Visual C++: ??