Skip to content

Commit d2cc230

Browse files
authored
[lib] Remove parameter names from deleted special member functions. (#3259)
1 parent 7f45b9e commit d2cc230

File tree

5 files changed

+33
-29
lines changed

5 files changed

+33
-29
lines changed

source/iostreams.tex

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4235,11 +4235,11 @@
42354235

42364236
protected:
42374237
// \ref{istream.cons}, copy/move constructor
4238-
basic_istream(const basic_istream& rhs) = delete;
4238+
basic_istream(const basic_istream&) = delete;
42394239
basic_istream(basic_istream&& rhs);
42404240

42414241
// \ref{istream.assign}, assign and swap
4242-
basic_istream& operator=(const basic_istream& rhs) = delete;
4242+
basic_istream& operator=(const basic_istream&) = delete;
42434243
basic_istream& operator=(basic_istream&& rhs);
42444244
void swap(basic_istream& rhs);
42454245
};
@@ -5625,11 +5625,11 @@
56255625

56265626
protected:
56275627
// \ref{iostream.cons}, constructor
5628-
basic_iostream(const basic_iostream& rhs) = delete;
5628+
basic_iostream(const basic_iostream&) = delete;
56295629
basic_iostream(basic_iostream&& rhs);
56305630

56315631
// \ref{iostream.assign}, assign and swap
5632-
basic_iostream& operator=(const basic_iostream& rhs) = delete;
5632+
basic_iostream& operator=(const basic_iostream&) = delete;
56335633
basic_iostream& operator=(basic_iostream&& rhs);
56345634
void swap(basic_iostream& rhs);
56355635
};
@@ -5789,11 +5789,11 @@
57895789

57905790
protected:
57915791
// \ref{ostream.cons}, copy/move constructor
5792-
basic_ostream(const basic_ostream& rhs) = delete;
5792+
basic_ostream(const basic_ostream&) = delete;
57935793
basic_ostream(basic_ostream&& rhs);
57945794

57955795
// \ref{ostream.assign}, assign and swap
5796-
basic_ostream& operator=(const basic_ostream& rhs) = delete;
5796+
basic_ostream& operator=(const basic_ostream&) = delete;
57975797
basic_ostream& operator=(basic_ostream&& rhs);
57985798
void swap(basic_ostream& rhs);
57995799
};
@@ -7443,12 +7443,12 @@
74437443
explicit basic_stringbuf(
74447444
const basic_string<charT, traits, SAlloc>& s,
74457445
ios_base::openmode which = ios_base::in | ios_base::out);
7446-
basic_stringbuf(const basic_stringbuf& rhs) = delete;
7446+
basic_stringbuf(const basic_stringbuf&) = delete;
74477447
basic_stringbuf(basic_stringbuf&& rhs);
74487448
basic_stringbuf(basic_stringbuf&& rhs, const Allocator& a);
74497449

74507450
// \ref{stringbuf.assign}, assign and swap
7451-
basic_stringbuf& operator=(const basic_stringbuf& rhs) = delete;
7451+
basic_stringbuf& operator=(const basic_stringbuf&) = delete;
74527452
basic_stringbuf& operator=(basic_stringbuf&& rhs);
74537453
void swap(basic_stringbuf& rhs) noexcept(@\seebelow@);
74547454

@@ -8244,11 +8244,11 @@
82448244
explicit basic_istringstream(
82458245
const basic_string<charT, traits, SAlloc>& s,
82468246
ios_base::openmode which = ios_base::in);
8247-
basic_istringstream(const basic_istringstream& rhs) = delete;
8247+
basic_istringstream(const basic_istringstream&) = delete;
82488248
basic_istringstream(basic_istringstream&& rhs);
82498249

82508250
// \ref{istringstream.assign}, assign and swap
8251-
basic_istringstream& operator=(const basic_istringstream& rhs) = delete;
8251+
basic_istringstream& operator=(const basic_istringstream&) = delete;
82528252
basic_istringstream& operator=(basic_istringstream&& rhs);
82538253
void swap(basic_istringstream& rhs);
82548254

@@ -8577,11 +8577,11 @@
85778577
explicit basic_ostringstream(
85788578
const basic_string<charT, traits, SAlloc>& s,
85798579
ios_base::openmode which = ios_base::out);
8580-
basic_ostringstream(const basic_ostringstream& rhs) = delete;
8580+
basic_ostringstream(const basic_ostringstream&) = delete;
85818581
basic_ostringstream(basic_ostringstream&& rhs);
85828582

85838583
// \ref{ostringstream.assign}, assign and swap
8584-
basic_ostringstream& operator=(const basic_ostringstream& rhs) = delete;
8584+
basic_ostringstream& operator=(const basic_ostringstream&) = delete;
85858585
basic_ostringstream& operator=(basic_ostringstream&& rhs);
85868586
void swap(basic_ostringstream& rhs);
85878587

@@ -8914,11 +8914,11 @@
89148914
explicit basic_stringstream(
89158915
const basic_string<charT, traits, SAlloc>& s,
89168916
ios_base::openmode which = ios_base::out | ios_base::in);
8917-
basic_stringstream(const basic_stringstream& rhs) = delete;
8917+
basic_stringstream(const basic_stringstream&) = delete;
89188918
basic_stringstream(basic_stringstream&& rhs);
89198919

89208920
// \ref{stringstream.assign}, assign and swap
8921-
basic_stringstream& operator=(const basic_stringstream& rhs) = delete;
8921+
basic_stringstream& operator=(const basic_stringstream&) = delete;
89228922
basic_stringstream& operator=(basic_stringstream&& rhs);
89238923
void swap(basic_stringstream& rhs);
89248924

@@ -9299,12 +9299,12 @@
92999299

93009300
// \ref{filebuf.cons}, constructors/destructor
93019301
basic_filebuf();
9302-
basic_filebuf(const basic_filebuf& rhs) = delete;
9302+
basic_filebuf(const basic_filebuf&) = delete;
93039303
basic_filebuf(basic_filebuf&& rhs);
93049304
virtual ~basic_filebuf();
93059305

93069306
// \ref{filebuf.assign}, assign and swap
9307-
basic_filebuf& operator=(const basic_filebuf& rhs) = delete;
9307+
basic_filebuf& operator=(const basic_filebuf&) = delete;
93089308
basic_filebuf& operator=(basic_filebuf&& rhs);
93099309
void swap(basic_filebuf& rhs);
93109310

@@ -10079,11 +10079,11 @@
1007910079
ios_base::openmode mode = ios_base::in);
1008010080
explicit basic_ifstream(const filesystem::path& s,
1008110081
ios_base::openmode mode = ios_base::in);
10082-
basic_ifstream(const basic_ifstream& rhs) = delete;
10082+
basic_ifstream(const basic_ifstream&) = delete;
1008310083
basic_ifstream(basic_ifstream&& rhs);
1008410084

1008510085
// \ref{ifstream.assign}, assign and swap
10086-
basic_ifstream& operator=(const basic_ifstream& rhs) = delete;
10086+
basic_ifstream& operator=(const basic_ifstream&) = delete;
1008710087
basic_ifstream& operator=(basic_ifstream&& rhs);
1008810088
void swap(basic_ifstream& rhs);
1008910089

@@ -10335,11 +10335,11 @@
1033510335
ios_base::openmode mode = ios_base::out);
1033610336
explicit basic_ofstream(const filesystem::path& s,
1033710337
ios_base::openmode mode = ios_base::out);
10338-
basic_ofstream(const basic_ofstream& rhs) = delete;
10338+
basic_ofstream(const basic_ofstream&) = delete;
1033910339
basic_ofstream(basic_ofstream&& rhs);
1034010340

1034110341
// \ref{ofstream.assign}, assign and swap
10342-
basic_ofstream& operator=(const basic_ofstream& rhs) = delete;
10342+
basic_ofstream& operator=(const basic_ofstream&) = delete;
1034310343
basic_ofstream& operator=(basic_ofstream&& rhs);
1034410344
void swap(basic_ofstream& rhs);
1034510345

@@ -10593,11 +10593,11 @@
1059310593
explicit basic_fstream(
1059410594
const filesystem::path& s,
1059510595
ios_base::openmode mode = ios_base::in | ios_base::out);
10596-
basic_fstream(const basic_fstream& rhs) = delete;
10596+
basic_fstream(const basic_fstream&) = delete;
1059710597
basic_fstream(basic_fstream&& rhs);
1059810598

1059910599
// \ref{fstream.assign}, assign and swap
10600-
basic_fstream& operator=(const basic_fstream& rhs) = delete;
10600+
basic_fstream& operator=(const basic_fstream&) = delete;
1060110601
basic_fstream& operator=(basic_fstream&& rhs);
1060210602
void swap(basic_fstream& rhs);
1060310603

source/support.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3064,8 +3064,8 @@
30643064
size_t hash_code() const noexcept;
30653065
const char* name() const noexcept;
30663066

3067-
type_info(const type_info& rhs) = delete; // cannot be copied
3068-
type_info& operator=(const type_info& rhs) = delete; // cannot be copied
3067+
type_info(const type_info&) = delete; // cannot be copied
3068+
type_info& operator=(const type_info&) = delete; // cannot be copied
30693069
};
30703070
}
30713071
\end{codeblock}

source/threads.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6085,12 +6085,12 @@
60856085
template<class Allocator>
60866086
promise(allocator_arg_t, const Allocator& a);
60876087
promise(promise&& rhs) noexcept;
6088-
promise(const promise& rhs) = delete;
6088+
promise(const promise&) = delete;
60896089
~promise();
60906090

60916091
// assignment
60926092
promise& operator=(promise&& rhs) noexcept;
6093-
promise& operator=(const promise& rhs) = delete;
6093+
promise& operator=(const promise&) = delete;
60946094
void swap(promise& other) noexcept;
60956095

60966096
// retrieving the result
@@ -6434,9 +6434,9 @@
64346434
public:
64356435
future() noexcept;
64366436
future(future&&) noexcept;
6437-
future(const future& rhs) = delete;
6437+
future(const future&) = delete;
64386438
~future();
6439-
future& operator=(const future& rhs) = delete;
6439+
future& operator=(const future&) = delete;
64406440
future& operator=(future&&) noexcept;
64416441
shared_future<R> share() noexcept;
64426442

source/utilities.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12727,7 +12727,7 @@
1272712727
template<class U>
1272812728
polymorphic_allocator(const polymorphic_allocator<U>& other) noexcept;
1272912729

12730-
polymorphic_allocator& operator=(const polymorphic_allocator& rhs) = delete;
12730+
polymorphic_allocator& operator=(const polymorphic_allocator&) = delete;
1273112731

1273212732
// \ref{mem.poly.allocator.mem}, member functions
1273312733
[[nodiscard]] Tp* allocate(size_t n);

tools/check.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ for f in $texfiles; do
5050
done | grep . && exit 1
5151
# Fixup: sed '/\\begin{example}/{N;s/\n$//}'
5252

53+
# Deleted special member function with a parameter name.
54+
grep -n "&[ 0-9a-z_]\+) = delete" $texfiles && exit 1
55+
# to fix: sed '/= delete/s/&[ 0-9a-z_]\+)/\&)/'
56+
5357
# \placeholder before (
5458
#egrep 'placeholder{[-A-Za-z]*}@?\(' *.tex
5559
# to fix: sed -i 's/placeholder\({[-A-Za-z]*}@\?(\)/placeholdernc\1/g' *.tex

0 commit comments

Comments
 (0)