Init
This commit is contained in:
34
cppdraft/format/fmt/string.md
Normal file
34
cppdraft/format/fmt/string.md
Normal file
@@ -0,0 +1,34 @@
|
||||
[format.fmt.string]
|
||||
|
||||
# 28 Text processing library [[text]](./#text)
|
||||
|
||||
## 28.5 Formatting [[format]](format#fmt.string)
|
||||
|
||||
### 28.5.4 Class template basic_format_string [format.fmt.string]
|
||||
|
||||
namespace std {template<class charT, class... Args>struct [basic_format_string](#lib:basic_format_string "28.5.4 Class template basic_format_string [format.fmt.string]") {private: basic_string_view<charT> *str*; // *exposition only*public:template<class T> consteval basic_format_string(const T& s);
|
||||
basic_format_string(*runtime-format-string*<charT> s) noexcept : str(s.*str*) {}constexpr basic_string_view<charT> get() const noexcept { return *str*; }};}
|
||||
|
||||
[ð](#itemdecl:1)
|
||||
|
||||
`template<class T> consteval basic_format_string(const T& s);
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L6680)
|
||||
|
||||
*Constraints*: const T& models [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_to [concept.convertible]")<basic_string_view<charT>>[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L6684)
|
||||
|
||||
*Effects*: Direct-non-list-initializes *str* with s[.](#2.sentence-1)
|
||||
|
||||
[3](#3)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L6688)
|
||||
|
||||
*Remarks*: A call to this function is not a core constant expression ([[expr.const]](expr.const "7.7 Constant expressions"))
|
||||
unless there exist args of types Args such that *str* is a format string for args[.](#3.sentence-1)
|
||||
Reference in New Issue
Block a user