File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -1396,7 +1396,10 @@ template <typename Char> struct named_arg_base {
13961396 }
13971397};
13981398
1399- template <typename T, typename Char> struct named_arg : named_arg_base<Char> {
1399+ struct view {};
1400+
1401+ template <typename T, typename Char>
1402+ struct named_arg : view, named_arg_base<Char> {
14001403 const T& value;
14011404
14021405 named_arg (basic_string_view<Char> name, const T& val)
@@ -1414,7 +1417,6 @@ inline void check_format_string(const S&) {
14141417template <typename ..., typename S, FMT_ENABLE_IF(is_compile_string<S>::value)>
14151418void check_format_string (S);
14161419
1417- struct view {};
14181420template <bool ...> struct bool_pack ;
14191421template <bool ... Args>
14201422using all_true =
@@ -1443,13 +1445,8 @@ typename buffer_context<Char>::iterator vformat_to(
14431445
14441446/* *
14451447 \rst
1446- Returns a named argument to be used in a formatting function.
1447-
1448- The named argument holds a reference and does not extend the lifetime
1449- of its arguments.
1450- Consequently, a dangling reference can accidentally be created.
1451- The user should take care to only pass this function temporaries when
1452- the named argument is itself a temporary, as per the following example.
1448+ Returns a named argument to be used in a formatting function. It should only
1449+ be used in a call to a formatting function.
14531450
14541451 **Example**::
14551452
You can’t perform that action at this time.
0 commit comments