<HTML><HEAD><TITLE>N1551, Changes to N1540 to Implement N1499 Parts 1 and 2</TITLE></HEAD><BODY>

<CENTER>
<H1><A NAME="N1551, Changes to N1540 to Implement N1499 Parts 1 and 2">N1551, Changes to N1540 to Implement N1499 Parts 1 and 2</A></H1>
</CENTER>

<TABLE ALIGN="RIGHT" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD ALIGN="RIGHT"><B><I>Document number:</I></B></TD>
<TD>&nbsp; N1551=03-0134</TD>
</TR>
<TR>
<TD ALIGN="RIGHT"><B><I>Date:</I></B></TD>
<TD>&nbsp; October 30, 2003</TD>
</TR>
<TR>
<TD ALIGN="RIGHT"><B><I>Project:</I></B></TD>
<TD>&nbsp; Programming Language C++</TD>
</TR>
<TR>
<TD ALIGN="RIGHT"><B><I>Reference:</I></B></TD>
<TD>&nbsp; ISO/IEC IS 14882:1998(E)</TD>
</TR>
<TR>
<TD ALIGN="RIGHT"><B><I>Reply to:</I></B></TD>
<TD>&nbsp; Pete Becker</TD>
</TR>
<TR>
<TD></TD>
<TD>&nbsp; Dinkumware, Ltd.</TD>
</TR>
<TR>
<TD></TD>
<TD>&nbsp; petebecker@acm.org</TD>
</TR>
</TABLE>
<BR CLEAR="ALL">

<HR>

<P>Move to amend N1540 as follows:</P>

<P>Change paragraph 2 of clause 7.3 [tr.re.sym] from:</P>

<BLOCKQUOTE>The header <CODE>&lt;regex&gt;</CODE> defines a container-like class
template that holds the result of a regular expression match.</BLOCKQUOTE>

<P>to:</P>

<BLOCKQUOTE>The header <CODE>&lt;regex&gt;</CODE> defines a class
template that holds the result of a regular expression match.</BLOCKQUOTE>

<P>In clause 7.4 [tr.re.syn] change the forward declaration of <CODE>basic_regex</CODE> from:</P>

<PRE>    template &lt;class charT,
            class traits = regex_traits&lt;charT&gt;,
            class Allocator = allocator&lt;charT&gt; &gt;
        class basic_regex;</PRE>

<P>to:</P>

<PRE>    template &lt;class charT,
            class traits = regex_traits&lt;charT&gt; &gt;
        class basic_regex;</PRE>

<P>In clause 7.4 [tr.re.syn] remove the following template functions:</P>

<PRE>    template &lt;class charT, class traits, class Allocator&gt;
        bool operator == (const basic_regex&lt;charT, traits, Allocator&gt;&amp; lhs,
            const basic_regex&lt;charT, traits, Allocator&gt;&amp; rhs);
        template &lt;class charT, class traits, class Allocator&gt;
        bool operator != (const basic_regex&lt;charT, traits, Allocator&gt;&amp; lhs,
            const basic_regex&lt;charT, traits, Allocator&gt;&amp; rhs);
        template &lt;class charT, class traits, class Allocator&gt;
        bool operator &lt; (const basic_regex&lt;charT, traits, Allocator&gt;&amp; lhs,
            const basic_regex&lt;charT, traits, Allocator&gt;&amp; rhs);
        template &lt;class charT, class traits, class Allocator&gt;
        bool operator &lt;= (const basic_regex&lt;charT, traits, Allocator&gt;&amp; lhs,
            const basic_regex&lt;charT, traits, Allocator&gt;&amp; rhs);
        template &lt;class charT, class traits, class Allocator&gt;
        bool operator &gt;= (const basic_regex&lt;charT, traits, Allocator&gt;&amp; lhs,
            const basic_regex&lt;charT, traits, Allocator&gt;&amp; rhs);
        template &lt;class charT, class traits, class Allocator&gt;
        bool operator &gt; (const basic_regex&lt;charT, traits, Allocator&gt;&amp; lhs,
            const basic_regex&lt;charT, traits, Allocator&gt;&amp; rhs);
        template &lt;class charT, class io_traits, class re_traits, class Allocator&gt;
        basic_ostream&lt;charT, io_traits&gt;&amp;
            operator &lt;&lt; (basic_ostream&lt;charT, io_traits&gt;&amp; os,
                const basic_regex&lt;charT, re_traits, Allocator&gt;&amp; e);</PRE>

<P>In clause 7.4 [tr.re.syn] change the declaration of the template
function <CODE>swap</CODE> from:</P>

<PRE>    template &lt;class charT, class traits, class Allocator&gt;
    void swap(basic_regex&lt;charT, traits, Allocator&gt;&amp; e1,
        basic_regex&lt;charT, traits, Allocator&gt;&amp; e2);</PRE>

<P>to:</P>

<PRE>    template &lt;class charT, class traits&gt;
    void swap(basic_regex&lt;charT, traits&gt;&amp; e1,
        basic_regex&lt;charT, traits&gt;&amp; e2);</PRE>

<P>In clause 7.4 [tr.re.syn] change the declarations of <CODE>regex_match</CODE>,
<CODE>regex_search</CODE>, and <CODE>regex_replace</CODE> from:</P>

<PRE>    template &lt;class BidirectionalIterator, class Allocator, class charT,
        class traits, class Allocator2&gt;
    bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
        match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class BidirectionalIterator,
        class charT, class traits,
        class Allocator2&gt;
    bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
        const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class charT, class Allocator, class traits, class Allocator2&gt;
    bool regex_match(const charT* str, match_results&lt;const charT*, Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class ST, class SA, class Allocator, class charT,
        class traits, class Allocator2&gt;
    bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s,
        match_results&lt;typename basic_string&lt;charT, ST, SA&gt;
        ::const_iterator,
        Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class charT, class traits, class Allocator2&gt;
    bool regex_match(const charT* str,
        const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class ST, class SA, class charT, class traits, class Allocator2&gt;
    bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s,
        const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class BidirectionalIterator, class Allocator, class charT,
        class traits, class Allocator2&gt;

    bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
        match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m,
    const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class charT, class Allocator, class traits, class Allocator2&gt;
    bool regex_search(const charT* str, match_results&lt;const charT*, Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class BidirectionalIterator, class Allocator, class charT,
        class traits&gt;
    bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
        const reg_expression&lt;charT, traits, Allocator&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class charT, class Allocator, class traits&gt;
    bool regex_search(const charT* str
        const reg_expression&lt;charT, traits, Allocator&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class ST, class SA, class Allocator, class charT,
        class traits&gt;
    bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s,
        const reg_expression&lt;charT, traits, Allocator&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class ST, class SA, class Allocator, class charT,
        class traits, class Allocator2&gt;
    bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s,
        match_results&lt;typename basic_string&lt;charT, ST, SA&gt;
        ::const_iterator,
        Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);

    template &lt;class OutputIterator, class BidirectionalIterator, class traits,
        class Allocator, class charT&gt;
    OutputIterator regex_replace(OutputIterator out,
        BidirectionalIterator first,
        BidirectionalIterator last,
        const reg_expression&lt;charT, traits, Allocator&gt;&amp; e,
        const basic_string&lt;charT&gt;&amp; fmt,
        match_flag_type flags = match_default);
    template &lt;class traits, class Allocator, class charT&gt;
    basic_string&lt;charT&gt; regex_replace(const basic_string&lt;charT&gt;&amp; s,
        const reg_expression&lt;charT, traits, Allocator&gt;&amp; e,
        const basic_string&lt;charT&gt;&amp; fmt,
        match_flag_type flags = match_default);</PRE>

<P>to:</P>

<PRE>    template &lt;class BidirectionalIterator, class Allocator, class charT,
        class traits&gt;
    bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
        match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class BidirectionalIterator,
        class charT, class traits&gt;
    bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class charT, class Allocator, class traits&gt;
    bool regex_match(const charT* str, match_results&lt;const charT*, Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class ST, class SA, class Allocator, class charT,
        class traits&gt;
    bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s,
        match_results&lt;typename basic_string&lt;charT, ST, SA&gt;
        ::const_iterator,
        Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class charT, class traits&gt;
    bool regex_match(const charT* str,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class ST, class SA, class charT, class traits&gt;
    bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);

    template &lt;class BidirectionalIterator, class Allocator, class charT,
        class traits&gt;
    bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
        match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class charT, class Allocator, class traits&gt;
    bool regex_search(const charT* str, match_results&lt;const charT*, Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class BidirectionalIterator, class charT,
        class traits&gt;
    bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class charT, class traits&gt;
    bool regex_search(const charT* str
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class ST, class SA, class charT,
        class traits&gt;
    bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);
    template &lt;class ST, class SA, class Allocator, class charT,
        class traits&gt;
    bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s,
        match_results&lt;typename basic_string&lt;charT, ST, SA&gt;
        ::const_iterator,
        Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);

    template &lt;class OutputIterator, class BidirectionalIterator, class traits,
        class charT&gt;
    OutputIterator regex_replace(OutputIterator out,
        BidirectionalIterator first,
        BidirectionalIterator last,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        const basic_string&lt;charT&gt;&amp; fmt,
        match_flag_type flags = match_default);
    template &lt;class traits, class charT&gt;
    basic_string&lt;charT&gt; regex_replace(const basic_string&lt;charT&gt;&amp; s,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        const basic_string&lt;charT&gt;&amp; fmt,
        match_flag_type flags = match_default);</PRE>

<P>In clause 7.4 [tr.re.syn] change the forward declarations of <CODE>regex_iterator</CODE>
and <CODE>regex_token_iterator</CODE> from:</P>

<PRE>    template &lt;class BidirectionalIterator,
        class charT = iterator_traits&lt;BidirectionalIterator&gt;::value_type,
        class traits = regex_traits&lt;charT&gt;,
        class Allocator = allocator&lt;charT&gt; &gt;
    class regex_iterator;
    template &lt;class BidirectionalIterator,
        class charT = iterator_traits&lt;BidirectionalIterator&gt;::value_type,
        class traits = regex_traits&lt;charT&gt;,
        class Allocator = allocator&lt;charT&gt; &gt;
    class regex_token_iterator;</PRE>

<P>to:</P>

<PRE>    template &lt;class BidirectionalIterator,
        class charT = iterator_traits&lt;BidirectionalIterator&gt;::value_type,
        class traits = regex_traits&lt;charT&gt; &gt;
    class regex_iterator;
    template &lt;class BidirectionalIterator,
        class charT = iterator_traits&lt;BidirectionalIterator&gt;::value_type,
        class traits = regex_traits&lt;charT&gt; &gt;
    class regex_token_iterator;</PRE>

<P>In clause 7.8 [tr.re.regex] remove the first sentence of the second paragraph,
which currently reads:</P>

<BLOCKQUOTE>The template class basic_regex conforms to the requirements of a Sequence,
as specified in [lib.sequence.reqmts], except that only operations defined for
const-qualified Sequences are supported.</BLOCKQUOTE>

<P>In clause 7.8 [tr.re.regex] change the definition of template class <CODE>basic_regex</CODE>
from:</P>

<PRE>    template &lt;class charT,
        class traits = regex_traits&lt;charT&gt;,
        class Allocator = allocator&lt;charT&gt; &gt;
    class basic_regex
    {
    public:
        // types:
        typedef charT value_type;
        typedef implementation-defined const_iterator;
        typedef const_iterator iterator;
        typedef typename Allocator::reference reference;
        typedef typename Allocator::const_reference const_reference;
        typedef typename Allocator::difference_type difference_type;
        typedef typename Allocator::size_type size_type;
        typedef Allocator allocator_type;
        typedef regex_constants::syntax_option_type flag_type;
        typedef typename traits::locale_type locale_type;

        // constants:
        static const regex_constants::syntax_option_type normal = regex_constants::normal;
        static const regex_constants::syntax_option_type icase = regex_constants::icase;
        static const regex_constants::syntax_option_type nosubs = regex_constants::nosubs;
        static const regex_constants::syntax_option_type optimize = regex_constants::optimize;
        static const regex_constants::syntax_option_type collate = regex_constants::collate;
        static const regex_constants::syntax_option_type ECMAScript = normal;
        static const regex_constants::syntax_option_type JavaScript = normal;
        static const regex_constants::syntax_option_type JScript = normal;
        // these flags are optional, if the functionality is supported
        // then the flags shall take these names.
        static const regex_constants::syntax_option_type basic = regex_constants::basic;
        static const regex_constants::syntax_option_type extended = regex_constants::extended;
        static const regex_constants::syntax_option_type awk = regex_constants::awk;
        static const regex_constants::syntax_option_type grep = regex_constants::grep;
        static const regex_constants::syntax_option_type egrep = regex_constants::egrep;
        static const regex_constants::syntax_option_type sed = basic = regex_constants::sed;
        static const regex_constants::syntax_option_type perl = regex_constants::perl;

        // construct/copy/destroy:
        explicit basic_regex(const Allocator&amp; a = Allocator());
        explicit basic_regex(const charT* p, flag_type f = regex_constants::normal,
            const Allocator&amp; a = Allocator());
        basic_regex(const charT* p1, const charT* p2, flag_type f = regex_constants::normal,
            const Allocator&amp; a = Allocator());
        basic_regex(const charT* p, size_type len, flag_type f,
            const Allocator&amp; a = Allocator());
        basic_regex(const basic_regex&amp;);
        template &lt;class ST, class SA&gt;
        explicit basic_regex(const basic_string&lt;charT, ST, SA&gt;&amp; p,
            flag_type f = regex_constants::normal,
            const Allocator&amp; a = Allocator());
        template &lt;class InputIterator&gt;
        basic_regex(InputIterator first, inputIterator last,
            flag_type f = regex_constants::normal,
            const Allocator&amp; a = Allocator());

        basic_regex();
        basic_regex&amp; operator=(const basic_regex&amp;);
        basic_regex&amp; operator=(const charT* ptr);
        template &lt;class ST, class SA&gt;
        basic_regex&amp; operator=(const basic_string&lt;charT, ST, SA&gt;&amp; p);

        // iterators:
        const_iterator begin() const;
        const_iterator end() const;
        // capacity:
        size_type size() const;
        size_type max_size() const;
        bool empty() const;
        unsigned mark_count() const;

        //
        // modifiers:
        basic_regex&amp; assign(const basic_regex&amp; that);
        basic_regex&amp; assign(const charT* ptr, flag_type f = regex_constants::normal);
        basic_regex&amp; assign(const charT* first, const charT* last,
            flag_type f = regex_constants::normal);
        template &lt;class string_traits, class A&gt;
        basic_regex&amp; assign(const basic_string&lt;charT, string_traits, A&gt;&amp; s,
            flag_type f = regex_constants::normal);
        template &lt;class InputIterator&gt;
        basic_regex&amp; assign(InputIterator first, InputIterator last,
            flag_type f = regex_constants::normal);

        // const operations:
        Allocator get_allocator() const;
        flag_type getflags() const;
        basic_string&lt;charT&gt; str() const;
        int compare(basic_regex&amp;) const;
        // locale:
        locale_type imbue(locale_type loc);
        locale_type getloc() const;
        // swap
        void swap(basic_regex&amp;) throw();
    };</PRE>

<P>to:</P>

<PRE>    template &lt;class charT,
        class traits = regex_traits&lt;charT&gt; &gt;
    class basic_regex
    {
    public:
        // types:
        typedef charT value_type;
        typedef regex_constants::syntax_option_type flag_type;
        typedef typename traits::locale_type locale_type;

        // constants:
        static const regex_constants::syntax_option_type normal = regex_constants::normal;
        static const regex_constants::syntax_option_type icase = regex_constants::icase;
        static const regex_constants::syntax_option_type nosubs = regex_constants::nosubs;
        static const regex_constants::syntax_option_type optimize = regex_constants::optimize;
        static const regex_constants::syntax_option_type collate = regex_constants::collate;
        static const regex_constants::syntax_option_type ECMAScript = normal;
        static const regex_constants::syntax_option_type JavaScript = normal;
        static const regex_constants::syntax_option_type JScript = normal;
        // these flags are optional, if the functionality is supported
        // then the flags shall take these names.
        static const regex_constants::syntax_option_type basic = regex_constants::basic;
        static const regex_constants::syntax_option_type extended = regex_constants::extended;
        static const regex_constants::syntax_option_type awk = regex_constants::awk;
        static const regex_constants::syntax_option_type grep = regex_constants::grep;
        static const regex_constants::syntax_option_type egrep = regex_constants::egrep;
        static const regex_constants::syntax_option_type sed = basic = regex_constants::sed;
        static const regex_constants::syntax_option_type perl = regex_constants::perl;

        // construct/copy/destroy:
        basic_regex();
        explicit basic_regex(const charT* p, flag_type f = regex_constants::normal);
        basic_regex(const charT* p1, const charT* p2, flag_type f = regex_constants::normal);
        basic_regex(const charT* p, size_type len, flag_type f);
        basic_regex(const basic_regex&amp;);
        template &lt;class ST, class SA&gt;
        explicit basic_regex(const basic_string&lt;charT, ST, SA&gt;&amp; p,
            flag_type f = regex_constants::normal);
        template &lt;class InputIterator&gt;
        basic_regex(InputIterator first, inputIterator last,
            flag_type f = regex_constants::normal);

        basic_regex();
        basic_regex&amp; operator=(const basic_regex&amp;);
        basic_regex&amp; operator=(const charT* ptr);
        template &lt;class ST, class SA&gt;
        basic_regex&amp; operator=(const basic_string&lt;charT, ST, SA&gt;&amp; p);

        // capacity:
        bool empty() const;
        unsigned mark_count() const;

        //
        // modifiers:
        basic_regex&amp; assign(const basic_regex&amp; that);
        basic_regex&amp; assign(const charT* ptr, flag_type f = regex_constants::normal);
        basic_regex&amp; assign(const charT* first, const charT* last,
            flag_type f = regex_constants::normal);
        template &lt;class string_traits, class A&gt;
        basic_regex&amp; assign(const basic_string&lt;charT, string_traits, A&gt;&amp; s,
            flag_type f = regex_constants::normal);
        template &lt;class InputIterator&gt;
        basic_regex&amp; assign(InputIterator first, InputIterator last,
            flag_type f = regex_constants::normal);

        // const operations:
        flag_type getflags() const;
        // locale:
        locale_type imbue(locale_type loc);
        locale_type getloc() const;
        // swap
        void swap(basic_regex&amp;) throw();
    };</PRE>

<P>In clause 7.8.2 [tr.re.regex.construct], remove the first paragraph, which
currently reads:</P>

<BLOCKQUOTE>In all basic regex constructors, a copy of the <CODE>Allocator</CODE>
argument is used for any memory allocation performed by the constructor or member
functions during the lifetime of the object.</BLOCKQUOTE>

<P>In clause 7.8.2 [tr.re.regex.construct], change the declaration of the
first constructor from:</P>

<PRE>    basic_regex(const Allocator&amp; a = Allocator());</PRE>

<P>to:</P>

<PRE>    basic_regex();</PRE>

<P>In clause 7.8.2 [tr.re.regex.construct], change the title of Table 7.7 from:</P>

<BLOCKQUOTE>basic_regex(const Allocator&) effects</BLOCKQUOTE>

<P>to:</P>

<BLOCKQUOTE>basic_regex() effects</BLOCKQUOTE>

<P>In clause 7.8.2 [tr.re.regex.construct], change the declaration of the
second constructor from:</P>

<PRE>    basic_regex(const charT* p,
        flag_type f = regex_constants::normal,
        const Allocator&amp; a = Allocator());</PRE>

<P>to:</P>

<PRE>    basic_regex(const charT* p,
        flag_type f = regex_constants::normal);</PRE>

<P>In clause 7.8.2 [tr.re.regex.construct], change the title of Table 7.8 from:</P>

<BLOCKQUOTE>basic_regex(const charT* p, flag_type f, const Allocator&) effects</BLOCKQUOTE>

<P>to:</P>

<BLOCKQUOTE>basic_regex(const charT* p, flag_type f) effects</BLOCKQUOTE>

<P>In clause 7.8.2 [tr.re.regex.construct], change the declaration of the
third constructor from:</P>

<PRE>    basic_regex(const charT* p1, const charT* p2,
        flag_type f = regex_constants::normal,
        const Allocator&amp; a = Allocator());</PRE>

<P>to:</P>

<PRE>    basic_regex(const charT* p1, const charT* p2,
        flag_type f = regex_constants::normal);</PRE>

<P>In clause 7.8.2 [tr.re.regex.construct], change the title of Table 7.9 from:</P>

<BLOCKQUOTE>basic_regex(const charT* p1, const charT* p2, flag_type f,
const Allocator&amp;) effects</BLOCKQUOTE>

<P>to:</P>

<BLOCKQUOTE>basic_regex(const charT* p1, const charT* p2, flag_type f) effects</BLOCKQUOTE>

<P>In clause 7.8.2 [tr.re.regex.construct], change the declaration of the
fourth constructor from:</P>

<PRE>    basic_regex(const charT* p, size_type len,
        flag_type f,
        const Allocator&amp; a = Allocator());</PRE>

<P>to:</P>

<PRE>    basic_regex(const charT* p, size_type len,
        flag_type f);</PRE>

<P>In clause 7.8.2 [tr.re.regex.construct], change the Requires clause of the
fourth constructor from:</P>

<BLOCKQUOTE>Requires: p shall not be a null pointer, len < max_size().</BLOCKQUOTE>

<P>to:</P>

<BLOCKQUOTE>Requires: p shall not be a null pointer.</BLOCKQUOTE>

<P>In clause 7.8.2 [tr.re.regex.construct], change the title of Table 7.10 from:</P>

<BLOCKQUOTE>basic_regex(const charT* p1, size_type len, flag_type f) effects</BLOCKQUOTE>

<P>In clause 7.8.2 [tr.re.regex.construct], change the declaration of the
sixth constructor from:</P>

<PRE>    template <class ST, class SA>
    basic_regex(const basic_string<charT, ST, SA>&amp; s,
        flag_type f = regex_constants::normal,
        const Allocator&amp; a = Allocator());</PRE>

<P>to:</P>

<PRE>    template <class ST, class SA>
    basic_regex(const basic_string<charT, ST, SA>&amp; s,
        flag_type f = regex_constants::normal)</PRE>

<P>In clause 7.8.2 [tr.re.regex.construct], change the declaration of the
seventh constructor from:</P>

<PRE>    template <class ForwardIterator>
    basic_regex(ForwardIterator first, ForwardIterator last,
        flag_type f = regex_constants::normal,
        const Allocator&amp; a = Allocator());</PRE>

<P>to:</P>

<PRE>    template <class ForwardIterator>
    basic_regex(ForwardIterator first, ForwardIterator last,
        flag_type f = regex_constants::normal)</PRE>

<P>In clause 7.8.2 [tr.re.regex.construct], change the title of Table 7.13 from:</P>

<BLOCKQUOTE>basic_regex(ForwardIterator first, ForwardIterator last, flag_type f,
const Allocator&amp;) effects</BLOCKQUOTE>

<P>to:</P>

<BLOCKQUOTE>basic_regex(ForwardIterator first, ForwardIterator last, flag_type f)
effects</BLOCKQUOTE>

<P>Remove clause 7.8.3 [tr.re.regex.iter].</P>

<P>In clause 7.8.4 [tr.re.regex.cap] remove the declaration of the member function
<CODE>size</CODE> and its <I>Effects</I> clause, and remove the declaration of the
member function <CODE>max_size</CODE> and its <I>Effects</I> clause.</P>

<P>In clause 7.8.6 [tr.re.regex.operations] remove the declaration of the member
function <CODE>get_allocator</CODE> and its <I>Effects</I> clause, remove the
declaration of the member function <CODE>str</CODE> and its <I>Effects</I> clause,
and remove the declaration of the member function <CODE>compare</CODE> and its
<I>Effects</I> clause.</P>

<P>Remove clause 7.8.9.1 [tr.re.regex.comp] and remove clause 7.8.9.2 [tr.re.regex.inserter].</P>

<P>In clause 7.8.9.3 [tr.re.regex.nmswap], change the declaration of the member function
<CODE>swap</CODE> from:</P>

<PRE>    template &lt;class charT, class traits, class Allocator&gt;
    void swap(basic_regex&lt;charT, traits, Allocator&gt;&amp; lhs,
        basic_regex&lt;charT, traits, Allocator&gt;&amp; rhs);</PRE>

<P>to:</P>

<PRE>    template &lt;class charT, class traits&gt;
    void swap(basic_regex&lt;charT, traits&gt;&amp; lhs,
        basic_regex&lt;charT, traits&gt;&amp; rhs);</PRE>

<P>In clause 7.10.1 [tr.re.alg.match] change the declaration of the
first version of <CODE>regex_match</CODE> from:</P>

<PRE>    template &lt;class BidirectionalIterator, class Allocator, class charT,
        class traits, class Allocator2&gt;
    bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
        match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>to:</P>

<PRE>    template &lt;class BidirectionalIterator, class Allocator, class charT,
        class traits&gt;
    bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
        match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>In clause 7.10.1 [tr.re.alg.match] change the declaration of the
second version of <CODE>regex_match</CODE> from:</P>

<PRE>    template &lt;class BidirectionalIterator, class charT, class traits, class Allocator2&gt;
    bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
        const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>to:</P>

<PRE>    template &lt;class BidirectionalIterator, class charT, class traits&gt;
    bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>In clause 7.10.1 [tr.re.alg.match] change the declaration of the
third version of <CODE>regex_match</CODE> from:</P>

<PRE>    template &lt;class charT, class Allocator, class traits, class Allocator2&gt;
    bool regex_match(const charT* str, match_results&lt;const charT*, Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>to:</P>

<PRE>    template &lt;class charT, class Allocator, class traits&gt;
    bool regex_match(const charT* str, match_results&lt;const charT*, Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>In clause 7.10.1 [tr.re.alg.match] change the declaration of the
fourth version of <CODE>regex_match</CODE> from:</P>

<PRE>    template &lt;class ST, class SA, class Allocator, class charT,
        class traits, class Allocator2&gt;
    bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s,
        match_results&lt;typename basic_string&lt;charT, ST, SA&gt;::const_iterator,
            const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>to:</P>

<PRE>    template &lt;class ST, class SA, class Allocator, class charT,
        class traits&gt;
    bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s,
        match_results&lt;typename basic_string&lt;charT, ST, SA&gt;::const_iterator,
            const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>In clause 7.10.1 [tr.re.alg.match] change the declaration of the
fifth version of <CODE>regex_match</CODE> from:</P>

<PRE>   template &lt;class charT, class traits, class Allocator2&gt;
    bool regex_match(const charT* str,
        const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>to:</P>

<PRE>   template &lt;class charT, class traits&gt;
    bool regex_match(const charT* str,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>In clause 7.10.1 [tr.re.alg.match] change the declaration of the
sixth version of <CODE>regex_match</CODE> from:</P>

<PRE>    template &lt;class ST, class SA, class charT, class traits, class Allocator2&gt;
    bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s,
        const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>to:</P>

<PRE>    template &lt;class ST, class SA, class charT, class traits&gt;
    bool regex_match(const basic_string&lt;charT, ST, SA&gt;&amp; s,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>In clause 7.10.2 [tr.re.alg.search] change the declaration of the
first version of <CODE>regex_search</CODE> from:</P>

<PRE>   template &lt;class BidirectionalIterator, class Allocator, class charT,
        class traits, class Allocator2&gt;
    bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
        match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>to:</P>

<PRE>   template &lt;class BidirectionalIterator, class Allocator, class charT,
        class traits&gt;
    bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
        match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>In clause 7.10.2 [tr.re.alg.search] change the declaration of the
second version of <CODE>regex_search</CODE> from:</P>

<PRE>    template &lt;class charT, class Allocator, class traits, class Allocator2&gt;
    bool regex_search(const charT* str, match_results&lt;const charT*, Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>to:</P>

<PRE>    template &lt;class charT, class Allocator, class traits&gt;
    bool regex_search(const charT* str, match_results&lt;const charT*, Allocator&gt;&amp; m,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>In clause 7.10.2 [tr.re.alg.search] change the declaration of the
third version of <CODE>regex_search</CODE> from:</P>

<PRE>    template &lt;class ST, class SA, class Allocator, class charT,
        class traits, class Allocator2&gt;
    bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s,
        match_results&lt;typename basic_string&lt;charT, ST, SA&gt;::const_iterator,
        const reg_expression&lt;charT, traits, Allocator2&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>to:</P>

<PRE>    template &lt;class ST, class SA, class Allocator, class charT,
        class traits&gt;
    bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s,
        match_results&lt;typename basic_string&lt;charT, ST, SA&gt;::const_iterator,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>In clause 7.10.2 [tr.re.alg.search] change the declaration of the
fourth version of <CODE>regex_search</CODE> from:</P>

<PRE>    template &lt;class iterator, class Allocator, class charT,
        class traits&gt;
    bool regex_search(iterator first, iterator last,
        const reg_expression&lt;charT, traits, Allocator&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>to:</P>

<PRE>    template &lt;class iterator, class charT,
        class traits&gt;
    bool regex_search(iterator first, iterator last,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>In clause 7.10.2 [tr.re.alg.search] change the declaration of the
fifth version of <CODE>regex_search</CODE> from:</P>

<PRE>    template &lt;class charT, class Allocator, class traits&gt;
    bool regex_search(const charT* str,
        const reg_expression&lt;charT, traits, Allocator&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>to:</P>

<PRE>    template &lt;class charT, class traits&gt;
    bool regex_search(const charT* str,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>In clause 7.10.2 [tr.re.alg.search] change the declaration of the
sixth version of <CODE>regex_search</CODE> from:</P>

<PRE>    template &lt;class ST, class SA, class Allocator, class charT,
        class traits&gt;
    bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s,
        const reg_expression&lt;charT, traits, Allocator&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>to:</P>

<PRE>    template &lt;class ST, class SA, class charT,
        class traits&gt;
    bool regex_search(const basic_string&lt;charT, ST, SA&gt;&amp; s,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        match_flag_type flags = match_default);</PRE>

<P>In clause 7.10.3 [tr.re.alg.replace] change the declaration of the
first version of <CODE>regex_replace</CODE> from:</P>

<PRE>    template &lt;class OutputIterator, class BidirectionalIterator, class traits,
        class Allocator, class charT&gt;
    OutputIterator regex_replace(OutputIterator out,
        BidirectionalIterator first,
        BidirectionalIterator last,
        const reg_expression&lt;charT, traits, Allocator&gt;&amp; e,
        const basic_string&lt;charT&gt;&amp; fmt,
        match_flag_type flags = match_default);</PRE>

<P>to:</P>

<PRE>    template &lt;class OutputIterator, class BidirectionalIterator, class traits,
        class charT&gt;
    OutputIterator regex_replace(OutputIterator out,
        BidirectionalIterator first,
        BidirectionalIterator last,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        const basic_string&lt;charT&gt;&amp; fmt,
        match_flag_type flags = match_default);</PRE>

<P>In clause 7.10.3 [tr.re.alg.replace] change the declaration of the
second version of <CODE>regex_replace</CODE> from:</P>

<PRE>    template &lt;class traits, class Allocator, class charT&gt;
    basic_string&lt;charT&gt; regex_replace(const basic_string&lt;charT&lt;&amp; s,
        const reg_expression&lt;charT, traits, Allocator&gt;&amp; e,
        const basic_string&lt;charT&gt;&amp; fmt,
        match_flag_type flags = match_default);</PRE>

<P>to:</P>

<PRE>    template &lt;class traits, class charT&gt;
    basic_string&lt;charT&gt; regex_replace(const basic_string&lt;charT&lt;&amp; s,
        const reg_expression&lt;charT, traits&gt;&amp; e,
        const basic_string&lt;charT&gt;&amp; fmt,
        match_flag_type flags = match_default);</PRE>

<P>In clause 7.11.1 [tr.re.regiter] change the beginning of the definition of the
template class <CODE>regex_iterator</CODE> from:</P>

<PRE>    template &lt;class BidirectionalIterator,
        class charT = iterator_traits&lt;BidirectionalIterator&gt;::value_type,
        class traits = regex_traits&lt;charT&gt;,
        class Allocator = allocator&lt;charT&gt; &gt;
    class regex_iterator
    {
    public:
        typedef basic_regex&lt;charT, traits, Allocator&gt;
            regex_type;</PRE>

<P>to:</P>

<PRE>    template &lt;class BidirectionalIterator,
        class charT = iterator_traits&lt;BidirectionalIterator&gt;::value_type,
        class traits = regex_traits&lt;charT&gt; &gt;
    class regex_iterator
    {
    public:
        typedef basic_regex&lt;charT, traits&gt;
            regex_type;</PRE>

<P>In clause 7.11.2 [tr.re.tokiter] change the beginning of the definition of the
template class <CODE>regex_token_iterator</CODE> from:</P>

<PRE>    template &lt;class BidirectionalIterator,
        class charT = iterator_traits&lt;BidirectionalIterator&gt;::value_type,
        class traits = regex_traits&lt;charT&gt;,
        class Allocator = allocator&lt;charT&gt; &gt;
    class regex_token_iterator
    {
    public:
        typedef basic_regex&lt;charT, traits, Allocator&gt;
        regex_type;</PRE>

<P>to:</P>

<PRE>    template &lt;class BidirectionalIterator,
        class charT = iterator_traits&lt;BidirectionalIterator&gt;::value_type,
        class traits = regex_traits&lt;charT&gt; &gt;
    class regex_token_iterator
    {
    public:
        typedef basic_regex&lt;charT, traits&gt;
        regex_type;</PRE>

</BODY></HTML>