Skip to content

Commit dff391e

Browse files
jensmaurertkoeppe
authored andcommitted
[lib] Use nullptr, not 0, for null pointer values. (#1586)
Fixes #208.
1 parent 5edf999 commit dff391e

File tree

4 files changed

+46
-46
lines changed

4 files changed

+46
-46
lines changed

source/future.tex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,14 @@
231231
public:
232232
explicit strstreambuf(streamsize alsize_arg = 0);
233233
strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
234-
strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = 0);
234+
strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = nullptr);
235235
strstreambuf(const char* gnext_arg, streamsize n);
236236

237237
strstreambuf(signed char* gnext_arg, streamsize n,
238-
signed char* pbeg_arg = 0);
238+
signed char* pbeg_arg = nullptr);
239239
strstreambuf(const signed char* gnext_arg, streamsize n);
240240
strstreambuf(unsigned char* gnext_arg, streamsize n,
241-
unsigned char* pbeg_arg = 0);
241+
unsigned char* pbeg_arg = nullptr);
242242
strstreambuf(const unsigned char* gnext_arg, streamsize n);
243243

244244
virtual ~strstreambuf();
@@ -388,11 +388,11 @@
388388
\indextext{unspecified}%
389389
\indexlibrary{\idxcode{strstreambuf}!constructor}%
390390
\begin{itemdecl}
391-
strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = 0);
391+
strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = nullptr);
392392
strstreambuf(signed char* gnext_arg, streamsize n,
393-
signed char* pbeg_arg = 0);
393+
signed char* pbeg_arg = nullptr);
394394
strstreambuf(unsigned char* gnext_arg, streamsize n,
395-
unsigned char* pbeg_arg = 0);
395+
unsigned char* pbeg_arg = nullptr);
396396
\end{itemdecl}
397397

398398
\begin{itemdescr}
@@ -2596,7 +2596,7 @@
25962596
public:
25972597
using state_type = typename Codecvt::state_type;
25982598

2599-
explicit wbuffer_convert(streambuf* bytebuf = 0,
2599+
explicit wbuffer_convert(streambuf* bytebuf = nullptr,
26002600
Codecvt* pcvt = new Codecvt,
26012601
state_type state = state_type());
26022602

@@ -2683,7 +2683,7 @@
26832683
\indexlibrary{\idxcode{wbuffer_convert}!constructor}%
26842684
\begin{itemdecl}
26852685
explicit wbuffer_convert(
2686-
streambuf* bytebuf = 0,
2686+
streambuf* bytebuf = nullptr,
26872687
Codecvt* pcvt = new Codecvt,
26882688
state_type state = state_type());
26892689
\end{itemdecl}

source/locales.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,7 +1540,7 @@
15401540
public:
15411541
using char_type = char;
15421542

1543-
explicit ctype(const mask* tab = 0, bool del = false, size_t refs = 0);
1543+
explicit ctype(const mask* tab = nullptr, bool del = false, size_t refs = 0);
15441544

15451545
bool is(mask m, char c) const;
15461546
const char* is(const char* low, const char* high, mask* vec) const;
@@ -1627,7 +1627,7 @@
16271627

16281628
\indexlibrary{\idxcode{ctype<char>}!constructor}%
16291629
\begin{itemdecl}
1630-
explicit ctype(const mask* tbl = 0, bool del = false, size_t refs = 0);
1630+
explicit ctype(const mask* tbl = nullptr, bool del = false, size_t refs = 0);
16311631
\end{itemdecl}
16321632

16331633
\begin{itemdescr}

source/strings.tex

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -751,14 +751,14 @@
751751
using wstring = basic_string<wchar_t>;
752752

753753
// \ref{string.conversions}, numeric conversions
754-
int stoi(const string& str, size_t* idx = 0, int base = 10);
755-
long stol(const string& str, size_t* idx = 0, int base = 10);
756-
unsigned long stoul(const string& str, size_t* idx = 0, int base = 10);
757-
long long stoll(const string& str, size_t* idx = 0, int base = 10);
758-
unsigned long long stoull(const string& str, size_t* idx = 0, int base = 10);
759-
float stof(const string& str, size_t* idx = 0);
760-
double stod(const string& str, size_t* idx = 0);
761-
long double stold(const string& str, size_t* idx = 0);
754+
int stoi(const string& str, size_t* idx = nullptr, int base = 10);
755+
long stol(const string& str, size_t* idx = nullptr, int base = 10);
756+
unsigned long stoul(const string& str, size_t* idx = nullptr, int base = 10);
757+
long long stoll(const string& str, size_t* idx = nullptr, int base = 10);
758+
unsigned long long stoull(const string& str, size_t* idx = nullptr, int base = 10);
759+
float stof(const string& str, size_t* idx = nullptr);
760+
double stod(const string& str, size_t* idx = nullptr);
761+
long double stold(const string& str, size_t* idx = nullptr);
762762
string to_string(int val);
763763
string to_string(unsigned val);
764764
string to_string(long val);
@@ -769,14 +769,14 @@
769769
string to_string(double val);
770770
string to_string(long double val);
771771

772-
int stoi(const wstring& str, size_t* idx = 0, int base = 10);
773-
long stol(const wstring& str, size_t* idx = 0, int base = 10);
774-
unsigned long stoul(const wstring& str, size_t* idx = 0, int base = 10);
775-
long long stoll(const wstring& str, size_t* idx = 0, int base = 10);
776-
unsigned long long stoull(const wstring& str, size_t* idx = 0, int base = 10);
777-
float stof(const wstring& str, size_t* idx = 0);
778-
double stod(const wstring& str, size_t* idx = 0);
779-
long double stold(const wstring& str, size_t* idx = 0);
772+
int stoi(const wstring& str, size_t* idx = nullptr, int base = 10);
773+
long stol(const wstring& str, size_t* idx = nullptr, int base = 10);
774+
unsigned long stoul(const wstring& str, size_t* idx = nullptr, int base = 10);
775+
long long stoll(const wstring& str, size_t* idx = nullptr, int base = 10);
776+
unsigned long long stoull(const wstring& str, size_t* idx = nullptr, int base = 10);
777+
float stof(const wstring& str, size_t* idx = nullptr);
778+
double stod(const wstring& str, size_t* idx = nullptr);
779+
long double stold(const wstring& str, size_t* idx = nullptr);
780780
wstring to_wstring(int val);
781781
wstring to_wstring(unsigned val);
782782
wstring to_wstring(long val);
@@ -4382,11 +4382,11 @@
43824382
\indexlibrary{\idxcode{stoll}}%
43834383
\indexlibrary{\idxcode{stoull}}%
43844384
\begin{itemdecl}
4385-
int stoi(const string& str, size_t* idx = 0, int base = 10);
4386-
long stol(const string& str, size_t* idx = 0, int base = 10);
4387-
unsigned long stoul(const string& str, size_t* idx = 0, int base = 10);
4388-
long long stoll(const string& str, size_t* idx = 0, int base = 10);
4389-
unsigned long long stoull(const string& str, size_t* idx = 0, int base = 10);
4385+
int stoi(const string& str, size_t* idx = nullptr, int base = 10);
4386+
long stol(const string& str, size_t* idx = nullptr, int base = 10);
4387+
unsigned long stoul(const string& str, size_t* idx = nullptr, int base = 10);
4388+
long long stoll(const string& str, size_t* idx = nullptr, int base = 10);
4389+
unsigned long long stoull(const string& str, size_t* idx = nullptr, int base = 10);
43904390
\end{itemdecl}
43914391

43924392
\begin{itemdescr}
@@ -4416,9 +4416,9 @@
44164416
\indexlibrary{\idxcode{stod}}%
44174417
\indexlibrary{\idxcode{stold}}%
44184418
\begin{itemdecl}
4419-
float stof(const string& str, size_t* idx = 0);
4420-
double stod(const string& str, size_t* idx = 0);
4421-
long double stold(const string& str, size_t* idx = 0);
4419+
float stof(const string& str, size_t* idx = nullptr);
4420+
double stod(const string& str, size_t* idx = nullptr);
4421+
long double stold(const string& str, size_t* idx = nullptr);
44224422
\end{itemdecl}
44234423

44244424
\begin{itemdescr}
@@ -4479,11 +4479,11 @@
44794479
\indexlibrary{\idxcode{stoll}}%
44804480
\indexlibrary{\idxcode{stoull}}%
44814481
\begin{itemdecl}
4482-
int stoi(const wstring& str, size_t* idx = 0, int base = 10);
4483-
long stol(const wstring& str, size_t* idx = 0, int base = 10);
4484-
unsigned long stoul(const wstring& str, size_t* idx = 0, int base = 10);
4485-
long long stoll(const wstring& str, size_t* idx = 0, int base = 10);
4486-
unsigned long long stoull(const wstring& str, size_t* idx = 0, int base = 10);
4482+
int stoi(const wstring& str, size_t* idx = nullptr, int base = 10);
4483+
long stol(const wstring& str, size_t* idx = nullptr, int base = 10);
4484+
unsigned long stoul(const wstring& str, size_t* idx = nullptr, int base = 10);
4485+
long long stoll(const wstring& str, size_t* idx = nullptr, int base = 10);
4486+
unsigned long long stoull(const wstring& str, size_t* idx = nullptr, int base = 10);
44874487
\end{itemdecl}
44884488

44894489
\begin{itemdescr}
@@ -4511,9 +4511,9 @@
45114511
\indexlibrary{\idxcode{stod}}%
45124512
\indexlibrary{\idxcode{stold}}%
45134513
\begin{itemdecl}
4514-
float stof(const wstring& str, size_t* idx = 0);
4515-
double stod(const wstring& str, size_t* idx = 0);
4516-
long double stold(const wstring& str, size_t* idx = 0);
4514+
float stof(const wstring& str, size_t* idx = nullptr);
4515+
double stod(const wstring& str, size_t* idx = nullptr);
4516+
long double stold(const wstring& str, size_t* idx = nullptr);
45174517
\end{itemdecl}
45184518

45194519
\begin{itemdescr}

source/utilities.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10324,7 +10324,7 @@
1032410324

1032510325
\begin{itemdescr}
1032610326
\pnum
10327-
\requires The expression \tcode{static_cast<T*>((U*)0)} shall
10327+
\requires The expression \tcode{static_cast<T*>((U*)nullptr)} shall
1032810328
be well formed.
1032910329

1033010330
\pnum
@@ -10350,7 +10350,7 @@
1035010350

1035110351
\begin{itemdescr}
1035210352
\pnum
10353-
\requires The expression \tcode{dynamic_cast<T*>((U*)0)}
10353+
\requires The expression \tcode{dynamic_cast<T*>((U*)nullptr)}
1035410354
shall be well formed and shall have well defined behavior.
1035510355

1035610356
\pnum
@@ -10377,7 +10377,7 @@
1037710377

1037810378
\begin{itemdescr}
1037910379
\pnum
10380-
\requires The expression \tcode{const_cast<T*>((U*)0)} shall
10380+
\requires The expression \tcode{const_cast<T*>((U*)nullptr)} shall
1038110381
be well formed.
1038210382

1038310383
\pnum
@@ -10402,7 +10402,7 @@
1040210402

1040310403
\begin{itemdescr}
1040410404
\pnum
10405-
\requires The expression \tcode{reinterpret_cast<T*>((U*)0)}
10405+
\requires The expression \tcode{reinterpret_cast<T*>((U*)nullptr)}
1040610406
shall be well formed.
1040710407

1040810408
\pnum\returns

0 commit comments

Comments
 (0)