Skip to content

Commit d06f8bc

Browse files
committed
Merge 2018-06 LWG Motion 25
Fixes #2142
2 parents 31d9743 + 193d621 commit d06f8bc

File tree

5 files changed

+100
-74
lines changed

5 files changed

+100
-74
lines changed

source/containers.tex

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8979,8 +8979,9 @@
89798979
Container c;
89808980

89818981
public:
8982+
queue() : queue(Container()) {}
89828983
explicit queue(const Container&);
8983-
explicit queue(Container&& = Container());
8984+
explicit queue(Container&&);
89848985
template<class Alloc> explicit queue(const Alloc&);
89858986
template<class Alloc> queue(const Container&, const Alloc&);
89868987
template<class Alloc> queue(Container&&, const Alloc&);
@@ -9030,7 +9031,7 @@
90309031
\end{itemdescr}
90319032

90329033
\begin{itemdecl}
9033-
explicit queue(Container&& cont = Container());
9034+
explicit queue(Container&& cont);
90349035
\end{itemdecl}
90359036

90369037
\begin{itemdescr}
@@ -9228,8 +9229,10 @@
92289229
Compare comp;
92299230

92309231
public:
9232+
priority_queue() : priority_queue(Compare()) {}
9233+
explicit priority_queue(const Compare& x) : priority_queue(x, Container()) {}
92319234
priority_queue(const Compare& x, const Container&);
9232-
explicit priority_queue(const Compare& x = Compare(), Container&& = Container());
9235+
priority_queue(const Compare& x, Container&&);
92339236
template<class InputIterator>
92349237
priority_queue(InputIterator first, InputIterator last, const Compare& x,
92359238
const Container&);
@@ -9286,7 +9289,7 @@
92869289
\indexlibrary{\idxcode{priority_queue}!constructor}%
92879290
\begin{itemdecl}
92889291
priority_queue(const Compare& x, const Container& y);
9289-
explicit priority_queue(const Compare& x = Compare(), Container&& y = Container());
9292+
priority_queue(const Compare& x, Container&& y);
92909293
\end{itemdecl}
92919294

92929295
\begin{itemdescr}
@@ -9524,8 +9527,9 @@
95249527
Container c;
95259528

95269529
public:
9530+
stack() : stack(Container()) {}
95279531
explicit stack(const Container&);
9528-
explicit stack(Container&& = Container());
9532+
explicit stack(Container&&);
95299533
template<class Alloc> explicit stack(const Alloc&);
95309534
template<class Alloc> stack(const Container&, const Alloc&);
95319535
template<class Alloc> stack(Container&&, const Alloc&);
@@ -9572,7 +9576,7 @@
95729576

95739577
\indexlibrary{\idxcode{stack}!constructor}%
95749578
\begin{itemdecl}
9575-
explicit stack(Container&& cont = Container());
9579+
explicit stack(Container&& cont);
95769580
\end{itemdecl}
95779581

95789582
\begin{itemdescr}

source/future.tex

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,8 @@
377377
namespace std {
378378
class strstreambuf : public basic_streambuf<char> {
379379
public:
380-
explicit strstreambuf(streamsize alsize_arg = 0);
380+
strstreambuf() : strstreambuf(0) {}
381+
explicit strstreambuf(streamsize alsize_arg);
381382
strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
382383
strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = nullptr);
383384
strstreambuf(const char* gnext_arg, streamsize n);
@@ -486,7 +487,7 @@
486487

487488
\indexlibrary{\idxcode{strstreambuf}!constructor}%
488489
\begin{itemdecl}
489-
explicit strstreambuf(streamsize alsize_arg = 0);
490+
explicit strstreambuf(streamsize alsize_arg);
490491
\end{itemdecl}
491492

492493
\begin{itemdescr}
@@ -2798,7 +2799,8 @@
27982799
using state_type = typename Codecvt::state_type;
27992800
using int_type = typename wide_string::traits_type::int_type;
28002801

2801-
explicit wstring_convert(Codecvt* pcvt = new Codecvt);
2802+
wstring_convert() : wstring_convert(new Codecvt) {}
2803+
explicit wstring_convert(Codecvt* pcvt);
28022804
wstring_convert(Codecvt* pcvt, state_type state);
28032805
explicit wstring_convert(const byte_string& byte_err,
28042806
const wide_string& wide_err = wide_string());
@@ -2992,7 +2994,7 @@
29922994

29932995
\indexlibrary{\idxcode{wstring_convert}!constructor}%
29942996
\begin{itemdecl}
2995-
explicit wstring_convert(Codecvt* pcvt = new Codecvt);
2997+
explicit wstring_convert(Codecvt* pcvt);
29962998
wstring_convert(Codecvt* pcvt, state_type state);
29972999
explicit wstring_convert(const byte_string& byte_err,
29983000
const wide_string& wide_err = wide_string());
@@ -3046,7 +3048,8 @@
30463048
public:
30473049
using state_type = typename Codecvt::state_type;
30483050

3049-
explicit wbuffer_convert(streambuf* bytebuf = nullptr,
3051+
wbuffer_convert() : wbuffer_convert(nullptr) {}
3052+
explicit wbuffer_convert(streambuf* bytebuf,
30503053
Codecvt* pcvt = new Codecvt,
30513054
state_type state = state_type());
30523055

@@ -3133,7 +3136,7 @@
31333136
\indexlibrary{\idxcode{wbuffer_convert}!constructor}%
31343137
\begin{itemdecl}
31353138
explicit wbuffer_convert(
3136-
streambuf* bytebuf = nullptr,
3139+
streambuf* bytebuf,
31373140
Codecvt* pcvt = new Codecvt,
31383141
state_type state = state_type());
31393142
\end{itemdecl}

source/iostreams.tex

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7371,8 +7371,8 @@
73717371
using allocator_type = Allocator;
73727372

73737373
// \ref{stringbuf.cons}, constructors
7374-
explicit basic_stringbuf(
7375-
ios_base::openmode which = ios_base::in | ios_base::out);
7374+
basic_stringbuf() : basic_stringbuf(ios_base::in | ios_base::out) {}
7375+
explicit basic_stringbuf(ios_base::openmode which);
73767376
explicit basic_stringbuf(
73777377
const basic_string<charT, traits, Allocator>& str,
73787378
ios_base::openmode which = ios_base::in | ios_base::out);
@@ -7439,8 +7439,7 @@
74397439

74407440
\indexlibrary{\idxcode{basic_stringbuf}!constructor}%
74417441
\begin{itemdecl}
7442-
explicit basic_stringbuf(
7443-
ios_base::openmode which = ios_base::in | ios_base::out);
7442+
explicit basic_stringbuf(ios_base::openmode which);
74447443
\end{itemdecl}
74457444

74467445
\begin{itemdescr}
@@ -7891,8 +7890,8 @@
78917890
using allocator_type = Allocator;
78927891

78937892
// \ref{istringstream.cons}, constructors
7894-
explicit basic_istringstream(
7895-
ios_base::openmode which = ios_base::in);
7893+
basic_istringstream() : basic_istringstream(ios_base::in) {}
7894+
explicit basic_istringstream(ios_base::openmode which);
78967895
explicit basic_istringstream(
78977896
const basic_string<charT, traits, Allocator>& str,
78987897
ios_base::openmode which = ios_base::in);
@@ -7937,7 +7936,7 @@
79377936

79387937
\indexlibrary{\idxcode{basic_istringstream}!constructor}%
79397938
\begin{itemdecl}
7940-
explicit basic_istringstream(ios_base::openmode which = ios_base::in);
7939+
explicit basic_istringstream(ios_base::openmode which);
79417940
\end{itemdecl}
79427941

79437942
\begin{itemdescr}
@@ -8078,8 +8077,8 @@
80788077
using allocator_type = Allocator;
80798078

80808079
// \ref{ostringstream.cons}, constructors
8081-
explicit basic_ostringstream(
8082-
ios_base::openmode which = ios_base::out);
8080+
basic_ostringstream() : basic_ostringstream(ios_base::out) {}
8081+
explicit basic_ostringstream(ios_base::openmode which);
80838082
explicit basic_ostringstream(
80848083
const basic_string<charT, traits, Allocator>& str,
80858084
ios_base::openmode which = ios_base::out);
@@ -8124,8 +8123,7 @@
81248123

81258124
\indexlibrary{\idxcode{basic_ostringstream}!constructor}%
81268125
\begin{itemdecl}
8127-
explicit basic_ostringstream(
8128-
ios_base::openmode which = ios_base::out);
8126+
explicit basic_ostringstream(ios_base::openmode which);
81298127
\end{itemdecl}
81308128

81318129
\begin{itemdescr}
@@ -8266,8 +8264,8 @@
82668264
using allocator_type = Allocator;
82678265

82688266
// \ref{stringstream.cons}, constructors
8269-
explicit basic_stringstream(
8270-
ios_base::openmode which = ios_base::out | ios_base::in);
8267+
basic_stringstream() : basic_stringstream(ios_base::out | ios_base::in) {}
8268+
explicit basic_stringstream(ios_base::openmode which);
82718269
explicit basic_stringstream(
82728270
const basic_string<charT, traits, Allocator>& str,
82738271
ios_base::openmode which = ios_base::out | ios_base::in);
@@ -8313,8 +8311,7 @@
83138311

83148312
\indexlibrary{\idxcode{basic_stringstream}!constructor}%
83158313
\begin{itemdecl}
8316-
explicit basic_stringstream(
8317-
ios_base::openmode which = ios_base::out | ios_base::in);
8314+
explicit basic_stringstream(ios_base::openmode which);
83188315
\end{itemdecl}
83198316

83208317
\begin{itemdescr}

0 commit comments

Comments
 (0)