<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Issue 3554: chrono::parse needs const charT* and basic_string_view&lt;charT&gt; overloads</title>
<meta property="og:title" content="Issue 3554: chrono::parse needs const charT* and basic_string_view&lt;charT&gt; overloads">
<meta property="og:description" content="C++ library issue. Status: C++23">
<meta property="og:url" content="https://cplusplus.github.io/LWG/issue3554.html">
<meta property="og:type" content="website">
<meta property="og:image" content="http://cplusplus.github.io/LWG/images/cpp_logo.png">
<meta property="og:image:alt" content="C++ logo">
<style>
  p {text-align:justify}
  li {text-align:justify}
  pre code.backtick::before { content: "`" }
  pre code.backtick::after { content: "`" }
  blockquote.note
  {
    background-color:#E0E0E0;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 1px;
    padding-bottom: 1px;
  }
  ins {background-color:#A0FFA0}
  del {background-color:#FFA0A0}
  table.issues-index { border: 1px solid; border-collapse: collapse; }
  table.issues-index th { text-align: center; padding: 4px; border: 1px solid; }
  table.issues-index td { padding: 4px; border: 1px solid; }
  table.issues-index td:nth-child(1) { text-align: right; }
  table.issues-index td:nth-child(2) { text-align: left; }
  table.issues-index td:nth-child(3) { text-align: left; }
  table.issues-index td:nth-child(4) { text-align: left; }
  table.issues-index td:nth-child(5) { text-align: center; }
  table.issues-index td:nth-child(6) { text-align: center; }
  table.issues-index td:nth-child(7) { text-align: left; }
  table.issues-index td:nth-child(5) span.no-pr { color: red; }
  @media (prefers-color-scheme: dark) {
     html {
        color: #ddd;
        background-color: black;
     }
     ins {
        background-color: #225522
     }
     del {
        background-color: #662222
     }
     a {
        color: #6af
     }
     a:visited {
        color: #6af
     }
     blockquote.note
     {
        background-color: rgba(255, 255, 255, .10)
     }
  }
</style>
</head>
<body>
<hr>
<p><em>This page is a snapshot from the LWG issues list, see the <a href="lwg-active.html">Library Active Issues List</a> for more information and the meaning of <a href="lwg-active.html#C++23">C++23</a> status.</em></p>
<h3 id="3554"><a href="lwg-defects.html#3554">3554</a>. <code>chrono::parse</code> needs <code>const charT*</code> and <code>basic_string_view&lt;charT&gt;</code> overloads</h3>
<p><b>Section:</b> 30.13 <a href="https://wg21.link/time.parse">[time.parse]</a> <b>Status:</b> <a href="lwg-active.html#C++23">C++23</a>
 <b>Submitter:</b> Howard Hinnant <b>Opened:</b> 2021-05-22 <b>Last modified:</b> 2023-11-22</p>
<p><b>Priority: </b>2
</p>
<p><b>View other</b> <a href="lwg-index-open.html#time.parse">active issues</a> in [time.parse].</p>
<p><b>View all other</b> <a href="lwg-index.html#time.parse">issues</a> in [time.parse].</p>
<p><b>View all issues with</b> <a href="lwg-status.html#C++23">C++23</a> status.</p>
<p><b>Discussion:</b></p>
<p>
The <code>chrono::parse</code> functions take <code>const basic_string&lt;charT, traits, Alloc&gt;&amp;</code> parameters
to specify the format strings for the parse. Due to an oversight on my part in the proposal, overloads taking
<code>const charT*</code> and <code>basic_string_view&lt;charT, traits&gt;</code> were omitted. These are necessary when
the supplied arguments is a string literal or <code>string_view</code> respectively:
</p>
<blockquote><pre>
in &gt;&gt; parse("%F %T", tp);
</pre></blockquote>
<p>
These overloads have been implemented in the <a href="https://github.com/HowardHinnant/date">example implementation</a>.
</p>

<p><i>[2021-05-26; Reflector poll]</i></p>

<p>
Set priority to 2 after reflector poll.
</p>

<p><strong>Previous resolution [SUPERSEDED]:</strong></p>
<blockquote class="note">
<p>
This wording is relative to <a href="https://wg21.link/n4885">N4885</a>.
</p>

<ol>
<li><p>Modify 30.2 <a href="https://wg21.link/time.syn">[time.syn]</a>, header <code>&lt;chrono&gt;</code> synopsis, as indicated:</p>

<blockquote>
<pre>
[&hellip;]
namespace chrono {
  <i>// 30.13 <a href="https://wg21.link/time.parse">[time.parse]</a>, parsing</i>
  <ins>template&lt;class charT, class Parsable&gt;
    <i>unspecified</i>
      parse(const charT* fmt, Parsable&amp; tp);

  template&lt;class charT, class traits, class Parsable&gt;
    <i>unspecified</i>
      parse(basic_string_view&lt;charT, traits&gt; fmt, Parsable&amp; tp);

  template&lt;class charT, class traits, class Alloc, class Parsable&gt;
    <i>unspecified</i>
      parse(const charT* fmt, Parsable&amp; tp,
            basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev);

  template&lt;class charT, class traits, class Alloc, class Parsable&gt;
    <i>unspecified</i>
      parse(basic_string_view&lt;charT, traits&gt; fmt, Parsable&amp; tp,
            basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev);

  template&lt;class charT, class Parsable&gt;
    <i>unspecified</i>
      parse(const charT* fmt, Parsable&amp; tp, minutes&amp; offset);

  template&lt;class charT, class traits, class Parsable&gt;
    <i>unspecified</i>
      parse(basic_string_view&lt;charT, traits&gt; fmt, Parsable&amp; tp, minutes&amp; offset);

  template&lt;class charT, class traits, class Alloc, class Parsable&gt;
  <i>unspecified</i>
    parse(const charT* fmt, Parsable&amp; tp,
          basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev, minutes&amp; offset);

  template&lt;class charT, class traits, class Alloc, class Parsable&gt;
    <i>unspecified</i>
      parse(basic_string_view&lt;charT, traits&gt; fmt, Parsable&amp; tp,
            basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev, minutes&amp; offset);</ins>

  template&lt;class charT, class traits, class Alloc, class Parsable&gt;
    <i>unspecified</i>
      parse(const basic_string&lt;charT, traits, Alloc&gt;&amp; format, Parsable&amp; tp);

  template&lt;class charT, class traits, class Alloc, class Parsable&gt;
    <i>unspecified</i>
      parse(const basic_string&lt;charT, traits, Alloc&gt;&amp; format, Parsable&amp; tp,
            basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev);

  template&lt;class charT, class traits, class Alloc, class Parsable&gt;
    <i>unspecified</i>
      parse(const basic_string&lt;charT, traits, Alloc&gt;&amp; format, Parsable&amp; tp,
            minutes&amp; offset);

  template&lt;class charT, class traits, class Alloc, class Parsable&gt;
    <i>unspecified</i>
      parse(const basic_string&lt;charT, traits, Alloc&gt;&amp; format, Parsable&amp; tp,
            basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev, minutes&amp; offset);

  [&hellip;]
}
[&hellip;]
</pre>
</blockquote>
</li>

<li><p>Modify 30.13 <a href="https://wg21.link/time.parse">[time.parse]</a> as indicated:</p>

<blockquote>
<pre>
<ins>template&lt;class charT, class Parsable&gt;
  <i>unspecified</i>
    parse(const charT* fmt, Parsable&amp; tp);</ins>
</pre>
<blockquote>
<p>
<ins>-?- <i>Constraints:</i> The expression</ins>
</p>
<blockquote><pre>
<ins>from_stream(declval&lt;basic_istream&lt;charT&gt;&amp;&gt;(), fmt, tp)</ins>
</pre></blockquote>
<p>
<ins>is well-formed when treated as an unevaluated operand.</ins>
<p/>
<ins>-?- <i>Effects:</i> Equivalent to <code>return parse(basic_string&lt;charT&gt;{fmt}, tp);</code></ins>
</p>
</blockquote>
<pre>
<ins>template&lt;class charT, class traits, class Parsable&gt;
  <i>unspecified</i>
    parse(basic_string_view&lt;charT, traits&gt; fmt, Parsable&amp; tp);</ins>
</pre>
<blockquote>
<p>
<ins>-?- <i>Constraints:</i> The expression</ins>
</p>
<blockquote><pre>
<ins>from_stream(declval&lt;basic_istream&lt;charT, traits&gt;&amp;&gt;(), fmt.data(), tp)</ins>
</pre></blockquote>
<p>
<ins>is well-formed when treated as an unevaluated operand.</ins>
<p/>
<ins>-?- <i>Effects:</i> Equivalent to <code>return parse(basic_string&lt;charT, traits&gt;{fmt}, tp);</code></ins>
</p>
</blockquote>
<pre>
<ins>template&lt;class charT, class traits, class Alloc, class Parsable&gt;
  <i>unspecified</i>
    parse(const charT* fmt, Parsable&amp; tp,
          basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev);</ins>
</pre>
<blockquote>
<p>
<ins>-?- <i>Constraints:</i> The expression</ins>
</p>
<blockquote><pre>
<ins>from_stream(declval&lt;basic_istream&lt;charT, traits&gt;&amp;&gt;(), fmt, tp, addressof(abbrev))</ins>
</pre></blockquote>
<p>
<ins>is well-formed when treated as an unevaluated operand.</ins>
<p/>
<ins>-?- <i>Effects:</i> Equivalent to <code>return parse(basic_string&lt;charT, traits, Alloc&gt;{fmt}, tp, abbrev);</code></ins>
</p>
</blockquote>
<pre>
<ins>template&lt;class charT, class traits, class Alloc, class Parsable&gt;
  <i>unspecified</i>
    parse(basic_string_view&lt;charT, traits&gt; fmt, Parsable&amp; tp,
          basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev);</ins>
</pre>
<blockquote>
<p>
<ins>-?- <i>Constraints:</i> The expression</ins>
</p>
<blockquote><pre>
<ins>from_stream(declval&lt;basic_istream&lt;charT, traits&gt;&amp;&gt;(), fmt.data(), tp, addressof(abbrev))</ins>
</pre></blockquote>
<p>
<ins>is well-formed when treated as an unevaluated operand.</ins>
<p/>
<ins>-?- <i>Effects:</i> Equivalent to <code>return parse(basic_string&lt;charT, traits, Alloc&gt;{fmt}, tp, abbrev);</code></ins>
</p>
</blockquote>
<pre>
<ins>template&lt;class charT, class Parsable&gt;
  <i>unspecified</i>
    parse(const charT* fmt, Parsable&amp; tp, minutes&amp; offset);</ins>
</pre>
<blockquote>
<p>
<ins>-?- <i>Constraints:</i> The expression</ins>
</p>
<blockquote><pre>
<ins>from_stream(declval&lt;basic_istream&lt;charT&gt;&amp;&gt;(), fmt, tp,
            declval&lt;basic_string&lt;charT&gt;*&gt;(),
            &amp;offset)</ins>
</pre></blockquote>
<p>
<ins>is well-formed when treated as an unevaluated operand.</ins>
<p/>
<ins>-?- <i>Effects:</i> Equivalent to <code>return parse(basic_string&lt;charT&gt;{fmt}, tp, offset);</code></ins>
</p>
</blockquote>
<pre>
<ins>template&lt;class charT, class traits, class Parsable&gt;
  <i>unspecified</i>
    parse(basic_string_view&lt;charT, traits&gt; fmt, Parsable&amp; tp, minutes&amp; offset);</ins>
</pre>
<blockquote>
<p>
<ins>-?- <i>Constraints:</i> The expression</ins>
</p>
<blockquote><pre>
<ins>from_stream(declval&lt;basic_istream&lt;charT, traits&gt;&amp;&gt;(), fmt.data(), tp,
            declval&lt;basic_string&lt;charT, traits&gt;*&gt;(),
            &amp;offset)</ins>
</pre></blockquote>
<p>
<ins>is well-formed when treated as an unevaluated operand.</ins>
<p/>
<ins>-?- <i>Effects:</i> Equivalent to <code>return parse(basic_string&lt;charT, traits&gt;{fmt}, tp, offset);</code></ins>
</p>
</blockquote>
<pre>
<ins>template&lt;class charT, class traits, class Alloc, class Parsable&gt;
<i>unspecified</i>
  parse(const charT* fmt, Parsable&amp; tp,
        basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev, minutes&amp; offset);</ins>
</pre>
<blockquote>
<p>
<ins>-?- <i>Constraints:</i> The expression</ins>
</p>
<blockquote><pre>
<ins>from_stream(declval&lt;basic_istream&lt;charT, traits&gt;&amp;&gt;(), fmt, tp, addressof(abbrev), &amp;offset)</ins>
</pre></blockquote>
<p>
<ins>is well-formed when treated as an unevaluated operand.</ins>
<p/>
<ins>-?- <i>Effects:</i> Equivalent to <code>return parse(basic_string&lt;charT, traits, Alloc&gt;{fmt}, tp, abbrev, offset);</code></ins>
</p>
</blockquote>
<pre>
<ins>template&lt;class charT, class traits, class Alloc, class Parsable&gt;
  <i>unspecified</i>
    parse(basic_string_view&lt;charT, traits&gt; fmt, Parsable&amp; tp,
          basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev, minutes&amp; offset);</ins>
</pre>
<blockquote>
<p>
<ins>-?- <i>Constraints:</i> The expression</ins>
</p>
<blockquote><pre>
<ins>from_stream(declval&lt;basic_istream&lt;charT, traits&gt;&amp;&gt;(), fmt.data(), tp, addressof(abbrev), &amp;offset)</ins>
</pre></blockquote>
<p>
<ins>is well-formed when treated as an unevaluated operand.</ins>
<p/>
<ins>-?- <i>Effects:</i> Equivalent to <code>return parse(basic_string&lt;charT, traits, Alloc&gt;{fmt}, tp, abbrev, offset);</code></ins>
</p>
</blockquote><pre>
template&lt;class charT, class traits, class Alloc, class Parsable&gt;
  <i>unspecified</i>
    parse(const basic_string&lt;charT, traits, Alloc&gt;&amp; format, Parsable&amp; tp);
</pre>
<blockquote>
<p>
-2- <i>Constraints:</i> The expression
</p>
<blockquote><pre>
from_stream(declval&lt;basic_istream&lt;charT, traits&gt;&amp;&gt;(), fmt.c_str(), tp)
</pre></blockquote>
<p>
is well-formed when treated as an unevaluated operand.
<p/>
-3- <i>Returns:</i> A manipulator such that the expression <code>is &gt;&gt; parse(fmt, tp)</code> has type <code>I</code>,
has value <code>is</code>, and calls <code>from_stream(is, fmt.c_str(), tp)</code>.
</p>
</blockquote>
</blockquote>
</li>
</ol>
</blockquote>

<p><i>[2021-06-02 Tim comments and provides updated wording]</i></p>

<p>
The current specification suggests that <code>parse</code> takes a reference to
the format string (stream extraction on the resulting manipulator is specified
to call <code>from_stream</code> on <code>fmt.c_str()</code>, not some copy), so we
can't call it with a temporary string.
<p/>
Additionally, since the underlying API (<code>from_stream</code>) requires a
null-terminated string, the usual practice is to avoid providing a
<code>string_view</code> overload (see, e.g., LWG <a href="lwg-defects.html#3430" title="std::fstream &amp; co. should be constructible from string_view (Status: C++23)">3430</a><sup><a href="https://cplusplus.github.io/LWG/issue3430" title="Latest snapshot">(i)</a></sup>). The wording
below therefore only provides <code>const charT*</code> overloads. It does not use
"Equivalent to" to avoid requiring that the <code>basic_string</code> overload
and the <code>const charT*</code> overload return the same type. As the manipulator
is intended to be immediately consumed, the wording also adds normative
encouragement to make misuse more difficult.
</p>


<p><i>[2021-06-23; Reflector poll]</i></p>

<p>
Set status to Tentatively Ready after six votes in favour during reflector poll.
</p>

<p><i>[2021-10-14 Approved at October 2021 virtual plenary. Status changed: Voting &rarr; WP.]</i></p>



<p id="res-3554"><b>Proposed resolution:</b></p>
<p>
This wording is relative to <a href="https://wg21.link/n4885">N4885</a>.
</p>

<ol>
<li><p>Modify 30.2 <a href="https://wg21.link/time.syn">[time.syn]</a>, header <code>&lt;chrono&gt;</code> synopsis, as indicated:</p>

<blockquote>
<pre>
[&hellip;]
namespace chrono {
  <i>// 30.13 <a href="https://wg21.link/time.parse">[time.parse]</a>, parsing</i>
  <ins>template&lt;class charT, class Parsable&gt;
    <i>unspecified</i>
      parse(const charT* fmt, Parsable&amp; tp);</ins>

  template&lt;class charT, class traits, class Alloc, class Parsable&gt;
    <i>unspecified</i>
      parse(const basic_string&lt;charT, traits, Alloc&gt;&amp; <del>format</del><ins>fmt</ins>, Parsable&amp; tp);

  <ins>template&lt;class charT, class traits, class Alloc, class Parsable&gt;
    <i>unspecified</i>
      parse(const charT* fmt, Parsable&amp; tp,
            basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev);</ins>

  template&lt;class charT, class traits, class Alloc, class Parsable&gt;
    <i>unspecified</i>
      parse(const basic_string&lt;charT, traits, Alloc&gt;&amp; <del>format</del><ins>fmt</ins>, Parsable&amp; tp,
            basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev);

  <ins>template&lt;class charT, class Parsable&gt;
    <i>unspecified</i>
      parse(const charT* fmt, Parsable&amp; tp, minutes&amp; offset);</ins>

  template&lt;class charT, class traits, class Alloc, class Parsable&gt;
    <i>unspecified</i>
      parse(const basic_string&lt;charT, traits, Alloc&gt;&amp; <del>format</del><ins>fmt</ins>, Parsable&amp; tp,
            minutes&amp; offset);

  <ins>template&lt;class charT, class traits, class Alloc, class Parsable&gt;
    <i>unspecified</i>
      parse(const charT* fmt, Parsable&amp; tp,
            basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev, minutes&amp; offset);</ins>

  template&lt;class charT, class traits, class Alloc, class Parsable&gt;
    <i>unspecified</i>
      parse(const basic_string&lt;charT, traits, Alloc&gt;&amp; <del>format</del><ins>fmt</ins>, Parsable&amp; tp,
            basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev, minutes&amp; offset);

  [&hellip;]
}
[&hellip;]
</pre>
</blockquote>
</li>

<li><p>Modify 30.13 <a href="https://wg21.link/time.parse">[time.parse]</a> as indicated:</p>
<p>
-1- Each <code>parse</code> overload specified in this subclause calls
<code>from_­stream</code> unqualified, so as to enable argument dependent lookup
(6.5.4 <a href="https://wg21.link/basic.lookup.argdep">[basic.lookup.argdep]</a>). In the following paragraphs,
let <code>is</code> denote an object of type <code>basic_­istream&lt;charT, traits&gt;</code>
and let <code>I</code> be <code>basic_­istream&lt;charT, traits&gt;&amp;</code>,
where <code>charT</code> and <code>traits</code> are template parameters in that context.
<p/>
<ins>-?- <i>Recommended practice:</i> Implementations should make it difficult to
accidentally store or use a manipulator that may contain a dangling reference to a
format string, for example by making the manipulators produced by <code>parse</code>
immovable and preventing stream extraction into an lvalue of such a manipulator
type.</ins>
</p>
<blockquote>
<pre>
<ins>template&lt;class charT, class Parsable&gt;
  <i>unspecified</i>
    parse(const charT* fmt, Parsable&amp; tp);</ins>
template&lt;class charT, class traits, class Alloc, class Parsable&gt;
  <i>unspecified</i>
    parse(const basic_string&lt;charT, traits, Alloc&gt;&amp; fmt, Parsable&amp; tp);
</pre>
<blockquote>
<p>
<ins>-?- Let <i>F</i> be <code>fmt</code> for the first overload and <code>fmt.c_str()</code> for the second overload.
Let <code>traits</code> be <code>char_traits&lt;charT&gt;</code> for the first overload.</ins>
<p/>
-2- <i>Constraints:</i> The expression
</p>
<blockquote><pre>
from_stream(declval&lt;basic_istream&lt;charT, traits&gt;&amp;&gt;(), <del>fmt.c_str()</del><ins><i>F</i></ins>, tp)
</pre></blockquote>
<p>
is well-formed when treated as an unevaluated operand.
<p/>
-3- <i>Returns:</i> A manipulator such that the expression <code>is &gt;&gt; parse(fmt, tp)</code>
has type <code>I</code>, has value <code>is</code>, and calls <code>from_­stream(is, <del>fmt.c_str()</del><ins><i>F</i></ins>, tp)</code>.
</p>
</blockquote>
<pre>
<ins>template&lt;class charT, class traits, class Alloc, class Parsable&gt;
  <i>unspecified</i>
    parse(const charT* fmt, Parsable&amp; tp,
          basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev);</ins>
template&lt;class charT, class traits, class Alloc, class Parsable&gt;
  <i>unspecified</i>
    parse(const basic_string&lt;charT, traits, Alloc&gt;&amp; fmt, Parsable&amp; tp,
          basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev);
</pre>
<blockquote>
<p>
<ins>-?- Let <i>F</i> be <code>fmt</code> for the first overload and <code>fmt.c_str()</code> for the second overload.</ins>
<p/>
-4- <i>Constraints:</i> The expression
</p>
<blockquote><pre>
from_stream(declval&lt;basic_istream&lt;charT, traits&gt;&amp;&gt;(), <del>fmt.c_str()</del><ins><i>F</i></ins>, tp, addressof(abbrev))
</pre></blockquote>
<p>
is well-formed when treated as an unevaluated operand.
<p/>
-5- <i>Returns:</i> A manipulator such that the expression <code>is &gt;&gt; parse(fmt, tp, abbrev)</code>
has type <code>I</code>, has value <code>is</code>, and calls <code>from_­stream(is, <del>fmt.c_str()</del><ins><i>F</i></ins>, tp, addressof(abbrev))</code>.
</p>
</blockquote>
<pre>
<ins>template&lt;class charT, class Parsable&gt;
  <i>unspecified</i>
    parse(const charT* fmt, Parsable&amp; tp, minutes&amp; offset);</ins>

template&lt;class charT, class traits, class Alloc, class Parsable&gt;
  <i>unspecified</i>
    parse(const basic_string&lt;charT, traits, Alloc&gt;&amp; fmt, Parsable&amp; tp,
          minutes&amp; offset);
</pre>
<blockquote>
<p>
<ins>-?- Let <i>F</i> be <code>fmt</code> for the first overload and <code>fmt.c_str()</code> for the second overload.
Let <code>traits</code> be <code>char_traits&lt;charT&gt;</code> and <code>Alloc</code> be <code>allocator&lt;charT&gt;</code>
for the first overload.</ins>
<p/>
-6- <i>Constraints:</i> The expression
</p>
<blockquote><pre>
from_stream(declval&lt;basic_istream&lt;charT, traits&gt;&amp;&gt;(),
            <del>fmt.c_str()</del><ins><i>F</i></ins>, tp,
            declval&lt;basic_string&lt;charT, traits, Alloc&gt;*&gt;(),
            &amp;offset)
</pre></blockquote>
<p>
is well-formed when treated as an unevaluated operand.
<p/>
-7- <i>Returns:</i> A manipulator such that the expression <code>is &gt;&gt; parse(fmt, tp, offset)</code>
has type <code>I</code>, has value <code>is</code>, and calls:
</p>
<blockquote><pre>
from_stream(is,
            <del>fmt.c_str()</del><ins><i>F</i></ins>, tp,
            static_cast&lt;basic_string&lt;charT, traits, Alloc&gt;*&gt;(nullptr),
            &amp;offset)
</pre></blockquote>
</blockquote>
<pre>
<ins>template&lt;class charT, class traits, class Alloc, class Parsable&gt;
  <i>unspecified</i>
    parse(const charT* fmt, Parsable&amp; tp,
          basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev, minutes&amp; offset);</ins>

template&lt;class charT, class traits, class Alloc, class Parsable&gt;
  <i>unspecified</i>
    parse(const basic_string&lt;charT, traits, Alloc&gt;&amp; fmt, Parsable&amp; tp,
          basic_string&lt;charT, traits, Alloc&gt;&amp; abbrev, minutes&amp; offset);
</pre>
<blockquote>
<p>
<ins>-?- Let <i>F</i> be <code>fmt</code> for the first overload and <code>fmt.c_str()</code> for the second overload.</ins>
<p/>
-8- <i>Constraints:</i> The expression
</p>
<blockquote><pre>
from_stream(declval&lt;basic_istream&lt;charT, traits&gt;&amp;&gt;(),
            <del>fmt.c_str()</del><ins><i>F</i></ins>, tp, addressof(abbrev), &amp;offset)
</pre></blockquote>
<p>
is well-formed when treated as an unevaluated operand.
<p/>
-9- <i>Returns:</i> A manipulator such that the expression <code>is &gt;&gt; parse(fmt, tp, abbrev, offset)</code>
has type <code>I</code>, has value <code>is</code>, and calls
<code>from_­stream(is, <del>fmt.c_str()</del><ins><i>F</i></ins>, tp, addressof(abbrev), &amp;offset)</code>.
</p>
</blockquote>
</blockquote>
</li>
</ol>





</body>
</html>
