Skip to content

Commit d96c47b

Browse files
committed
Merge pull request #616 from mclow/patch-2
[re.regex.assign] Swap effects of `basic_regex::operator=` and `assign`
2 parents 97e7eee + 7798b41 commit d96c47b

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

source/regex.tex

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,7 +1633,11 @@
16331633

16341634
\begin{itemdescr}
16351635
\pnum
1636-
\effects returns \tcode{assign(e)}.
1636+
\effects copies \tcode{e} into \tcode{*this} and returns \tcode{*this}.
1637+
1638+
\pnum\postconditions
1639+
\tcode{flags()} and \tcode{mark_count()} return
1640+
\tcode{e.flags()} and \tcode{e.mark_count()}, respectively.
16371641
\end{itemdescr}
16381642

16391643
\indexlibrary{\idxcode{basic_regex}!\idxcode{operator=}}%
@@ -1644,7 +1648,12 @@
16441648

16451649
\begin{itemdescr}
16461650
\pnum
1647-
\effects returns \tcode{assign(std::move(e))}.
1651+
\effects move assigns from \tcode{e} into \tcode{*this} and returns \tcode{*this}.
1652+
1653+
\pnum
1654+
\postconditions \tcode{flags()} and \tcode{mark_count()} return the values that
1655+
\tcode{e.flags()} and \tcode{e.mark_count()}, respectively, had before assignment.
1656+
\tcode{e} is in a valid state with unspecified value.
16481657
\end{itemdescr}
16491658

16501659
\indexlibrary{\idxcode{basic_regex}!\idxcode{operator=}}%
@@ -1692,11 +1701,10 @@
16921701

16931702
\begin{itemdescr}
16941703
\pnum
1695-
\effects copies \tcode{that} into \tcode{*this} and returns \tcode{*this}.
1704+
\effects Equivalent to \tcode{*this = that}.
16961705

1697-
\pnum\postconditions
1698-
\tcode{flags()} and \tcode{mark_count()} return
1699-
\tcode{that.flags()} and \tcode{that.mark_count()}, respectively.
1706+
\pnum
1707+
\returns \tcode{*this}.
17001708
\end{itemdescr}
17011709

17021710
\indexlibrary{\idxcode{basic_regex}!\idxcode{assign}}%
@@ -1707,12 +1715,10 @@
17071715

17081716
\begin{itemdescr}
17091717
\pnum
1710-
\effects move assigns from \tcode{that} into \tcode{*this} and returns \tcode{*this}.
1718+
\effects Equivalent to \tcode{*this = std::move(that)}.
17111719

17121720
\pnum
1713-
\postconditions \tcode{flags()} and \tcode{mark_count()} return the values that
1714-
\tcode{that.flags()} and \tcode{that.mark_count()}, respectively, had before assignment.
1715-
\tcode{that} is in a valid state with unspecified value.
1721+
\returns \tcode{*this}.
17161722
\end{itemdescr}
17171723

17181724
\indexlibrary{\idxcode{basic_regex}!\idxcode{assign}}%

0 commit comments

Comments
 (0)