Skip to content

Commit e21b45d

Browse files
author
msebolt
committed
daily update
1 parent a642765 commit e21b45d

9 files changed

Lines changed: 265 additions & 8 deletions

File tree

docs/standard-library/bad-alloc-class.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ The class describes an exception thrown to indicate that an allocation request d
1414
```cpp
1515
class bad_alloc : public exception {
1616
bad_alloc();
17-
virtual ~bad_alloc();
18-
17+
virtual ~bad_alloc();
18+
bad_alloc(const bad_alloc&);
19+
bad_alloc& operator=(const bad_alloc&);
20+
const char* what() const override;
1921
};
2022
```
2123
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: "bad_array_new_length Class"
3+
ms.date: "11/04/2016"
4+
f1_keywords: ["new/std::bad_alloc"]
5+
helpviewer_keywords: ["bad_alloc class"]
6+
ms.assetid: 6429a8e6-5a49-4907-8d56-f4a4ec8131d0
7+
---
8+
# bad_array_new_length Class
9+
10+
The class describes an exception thrown to indicate that an allocation request did not succeed.
11+
12+
## Syntax
13+
14+
```cpp
15+
class bad_array_new_length : public bad_alloc {
16+
public: bad_array_new_length() noexcept;
17+
const char* what() const noexcept override;
18+
};
19+
```
20+
21+
## Remarks
22+
23+
The value returned by `what` is an implementation-defined C string. None of the member functions throw any exceptions.
24+
25+
## Requirements
26+
27+
**Header:** \<new>
28+
29+
## See also
30+
31+
[exception Class](../standard-library/exception-class.md)<br/>
32+
[Thread Safety in the C++ Standard Library](../standard-library/thread-safety-in-the-cpp-standard-library.md)

docs/standard-library/cfloat.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,51 @@ Includes the Standard C library header \<float.h>.
1515
#include <cfloat>
1616
```
1717

18+
## Definitions
19+
20+
```cpp
21+
#define FLT_ROUNDS
22+
#define FLT_EVAL_METHOD
23+
#define FLT_HAS_SUBNORM
24+
#define DBL_HAS_SUBNORM
25+
#define LDBL_HAS_SUBNORM
26+
#define FLT_RADIX
27+
#define FLT_MANT_DIG
28+
#define DBL_MANT_DIG
29+
#define LDBL_MANT_DIG
30+
#define FLT_DECIMAL_DIG
31+
#define DBL_DECIMAL_DIG
32+
#define LDBL_DECIMAL_DIG
33+
#define DECIMAL_DIG
34+
#define FLT_DIG
35+
#define DBL_DIG
36+
#define LDBL_DIG
37+
#define FLT_MIN_EXP
38+
#define DBL_MIN_EXP
39+
#define LDBL_MIN_EXP
40+
#define FLT_MIN_10_EXP
41+
#define DBL_MIN_10_EXP
42+
#define LDBL_MIN_10_EXP
43+
#define FLT_MAX_EXP
44+
#define DBL_MAX_EXP
45+
#define LDBL_MAX_EXP
46+
#define FLT_MAX_10_EXP
47+
#define DBL_MAX_10_EXP
48+
#define LDBL_MAX_10_EXP
49+
#define FLT_MAX
50+
#define DBL_MAX
51+
#define LDBL_MAX
52+
#define FLT_EPSILON
53+
#define DBL_EPSILON
54+
#define LDBL_EPSILON
55+
#define FLT_MIN
56+
#define DBL_MIN
57+
#define LDBL_MIN
58+
#define FLT_TRUE_MIN
59+
#define DBL_TRUE_MIN
60+
#define LDBL_TRUE_MIN
61+
```
62+
1863
## See also
1964

2065
[Header Files Reference](../standard-library/cpp-standard-library-header-files.md)<br/>

docs/standard-library/climits.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,30 @@ Includes the Standard C library header \<limits.h> and adds the associated names
1919

2020
Including this header ensures that the names declared using external linkage in the Standard C library header are declared in the `std` namespace.
2121

22+
## Definitions
23+
24+
```cpp
25+
#define CHAR_BIT
26+
#define SCHAR_MIN
27+
#define SCHAR_MAX
28+
#define UCHAR_MAX
29+
#define CHAR_MIN
30+
#define CHAR_MAX
31+
#define MB_LEN_MAX
32+
#define SHRT_MIN
33+
#define SHRT_MAX
34+
#define USHRT_MAX
35+
#define INT_MIN
36+
#define INT_MAX
37+
#define UINT_MAX
38+
#define LONG_MIN
39+
#define LONG_MAX
40+
#define ULONG_MAX
41+
#define LLONG_MIN
42+
#define LLONG_MAX
43+
#define ULLONG_MAX
44+
```
45+
2246
## See also
2347

2448
[Header Files Reference](../standard-library/cpp-standard-library-header-files.md)<br/>

docs/standard-library/cstdint.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,39 @@ Includes the Standard C library header \<stdint.h> and adds the associated names
1414
#include <cstdint>
1515
```
1616

17+
## Types
18+
19+
```cpp
20+
namespace std { using int8_t = signed integer type; // optional
21+
using int16_t = signed integer type; // optional
22+
using int32_t = signed integer type; // optional
23+
using int64_t = signed integer type; // optional
24+
using int_fast8_t = signed integer type;
25+
using int_fast16_t = signed integer type;
26+
using int_fast32_t = signed integer type;
27+
using int_fast64_t = signed integer type;
28+
using int_least8_t = signed integer type;
29+
using int_least16_t = signed integer type;
30+
using int_least32_t = signed integer type;
31+
using int_least64_t = signed integer type;
32+
using intmax_t = signed integer type;
33+
using intptr_t = signed integer type; // optional
34+
using uint8_t = unsigned integer type; // optional
35+
using uint16_t = unsigned integer type; // optional
36+
using uint32_t = unsigned integer type; // optional
37+
using uint64_t = unsigned integer type; // optional
38+
using uint_fast8_t = unsigned integer type;
39+
using uint_fast16_t = unsigned integer type;
40+
using uint_fast32_t = unsigned integer type;
41+
using uint_fast64_t = unsigned integer type;
42+
using uint_least8_t = unsigned integer type;
43+
using uint_least16_t = unsigned integer type;
44+
using uint_least32_t = unsigned integer type;
45+
using uint_least64_t = unsigned integer type;
46+
using uintmax_t = unsigned integer type;
47+
using uintptr_t = unsigned integer type; // optional
48+
```
49+
1750
## Remarks
1851
1952
Including this header ensures that the names declared using external linkage in the Standard C library header are declared in the `std` namespace.

docs/standard-library/cstdlib.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,114 @@ Includes the Standard C library header \<stdlib.h> and adds the associated names
1919

2020
Including this header ensures that the names declared using external linkage in the Standard C library header are declared in the `std` namespace.
2121

22+
## Types
23+
24+
```cpp
25+
using size_t = see below;
26+
using div_t = see below;
27+
using ldiv_t = see below;
28+
using lldiv_t = see below;
29+
```
30+
31+
## Definitions
32+
33+
```cpp
34+
#define NULL
35+
#define EXIT_FAILURE
36+
#define EXIT_SUCCESS
37+
#define RAND_MAX
38+
#define MB_CUR_MAX
39+
```
40+
41+
## Functions
42+
43+
```cpp
44+
function type aliases extern "C"
45+
using c-atexit-handler = void();
46+
using atexit-handler = void();
47+
using c-compare-pred = int(const void*, const void*);
48+
using compare-pred = int(const void*, const void*);
49+
```
50+
51+
### Start and Termination
52+
53+
```cpp
54+
void abort() noexcept;
55+
int atexit(c-atexit-handler* func) noexcept;
56+
int atexit(atexit-handler* func) noexcept;
57+
int at_quick_exit(c-atexit-handler* func) noexcept;
58+
int at_quick_exit(atexit-handler* func) noexcept;
59+
void exit(int status);
60+
void _Exit(int status) noexcept;
61+
void quick_exit(int status) noexcept;
62+
63+
char* getenv(const char* name);
64+
int system(const char* string);
65+
66+
void* aligned_alloc(size_t alignment, size_t size);
67+
void* calloc(size_t nmemb, size_t size);
68+
void free(void* ptr);
69+
void* malloc(size_t size);
70+
void* realloc(void* ptr, size_t size);
71+
72+
double atof(const char* nptr);
73+
int atoi(const char* nptr);
74+
long int atol(const char* nptr);
75+
long long int atoll(const char* nptr);
76+
77+
double strtod(const char* nptr, char** endptr);
78+
float strtof(const char* nptr, char** endptr);
79+
long double strtold(const char* nptr, char** endptr);
80+
long int strtol(const char* nptr, char** endptr, int base);
81+
long long int strtoll(const char* nptr, char** endptr, int base);
82+
unsigned long int strtoul(const char* nptr, char** endptr, int base);
83+
unsigned long long int strtoull(const char* nptr, char** endptr, int base);
84+
```
85+
86+
### Multibyte / Wide String and Character Conversion
87+
88+
```cpp
89+
int mblen(const char* s, size_t n);
90+
int mbtowc(wchar_t* pwc, const char* s, size_t n);
91+
int wctomb(char* s, wchar_t wchar);
92+
size_t mbstowcs(wchar_t* pwcs, const char* s, size_t n);
93+
size_t wcstombs(char* s, const wchar_t* pwcs, size_t n);
94+
```
95+
96+
### C Standard Library Algorithms
97+
98+
```cpp
99+
void* bsearch(const void* key, const void* base, size_t nmemb, size_t size, c-compare-pred* compar);
100+
void* bsearch(const void* key, const void* base, size_t nmemb, size_t size, compare-pred* compar);
101+
void qsort(void* base, size_t nmemb, size_t size, c-compare-pred* compar);
102+
void qsort(void* base, size_t nmemb, size_t size, compare-pred* compar);
103+
```
104+
105+
### Low-quality Random Number Generation
106+
107+
```cpp
108+
int rand();
109+
void srand(unsigned int seed);
110+
```
111+
112+
### Absolute Values
113+
114+
```cpp
115+
int abs(int j);
116+
long int abs(long int j);
117+
long long int abs(long long int j);
118+
float abs(float j);
119+
double abs(double j);
120+
long double abs(long double j);
121+
long int labs(long int j);
122+
long long int llabs(long long int j);
123+
div_t div(int numer, int denom);
124+
ldiv_t div(long int numer, long int denom);
125+
lldiv_t div(long long int numer, long long int denom);
126+
ldiv_t ldiv(long int numer, long int denom);
127+
lldiv_t lldiv(long long int numer, long long int denom);
128+
```
129+
22130
## See also
23131

24132
[Header Files Reference](../standard-library/cpp-standard-library-header-files.md)<br/>

docs/standard-library/new-functions.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
---
22
title: "&lt;new&gt; functions"
33
ms.date: "11/04/2016"
4-
f1_keywords: ["new/std::nothrow", "new/std::set_new_handler"]
4+
f1_keywords: ["new/std::get_new_handler", "new/std::nothrow", "new/std::set_new_handler"]
55
ms.assetid: e250f06a-b025-4509-ae7a-5356d56aad7d
66
---
77
# &lt;new&gt; functions
88

99
|||
1010
|-|-|
11-
|[nothrow](#nothrow)|[set_new_handler](#set_new_handler)|
11+
|[get_new_handler](#get_new_handler)|[nothrow](#nothrow)|
12+
|[set_new_handler](#set_new_handler)|[set_new_handler](#set_new_handler)|
1213

13-
## <a name="nothrow"></a> nothrow
14+
## <a name="get_new_handler"></a> get_new_handler
15+
16+
```cpp
17+
new_handler get_new_handler() noexcept;
18+
```
19+
20+
## <a name="nothrow"></a> nothrow
1421

1522
Provides an object to be used as an argument for the **nothrow** versions of **new** and **delete**.
1623

@@ -26,7 +33,7 @@ The object is used as a function argument to match the parameter type [std::noth
2633

2734
See [operator new](../standard-library/new-operators.md#op_new) and [operator new&#91;&#93;](../standard-library/new-operators.md#op_new_arr) for examples of how `std::nothrow_t` is used as a function parameter.
2835

29-
## <a name="set_new_handler"></a> set_new_handler
36+
## <a name="set_new_handler"></a> set_new_handler
3037

3138
Installs a user function that is to be called when **operator new** fails in its attempt to allocate memory.
3239

docs/standard-library/new-typedefs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ typedef void (*new_handler)();
2020
2121
### Remarks
2222
23-
This type of handler function is called by **operatornew** or `operator new[]` when they cannot satisfy a request for additional storage.
23+
This type of handler function is called by **operator new** or `operator new[]` when they cannot satisfy a request for additional storage.
2424
2525
### Example
2626

docs/standard-library/new.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.assetid: 218e2a15-34e8-4ef3-9122-1e90eccf8559
88
# &lt;new&gt;
99

1010
Defines several types and functions that control the allocation and freeing of storage under program control. It also defines components for reporting on storage management errors.
11-
11+
1212
## Syntax
1313

1414
```cpp
@@ -35,6 +35,7 @@ Some of the functions declared in this header are replaceable. The implementatio
3535

3636
|Function|Description|
3737
|-|-|
38+
|[get_new_handler](../standard-library/new-functions.md#get_new_handler)||
3839
|[set_new_handler](../standard-library/new-functions.md#set_new_handler)|Installs a user function that is called when new fails in its attempt to allocate memory.|
3940

4041
### Operators
@@ -46,11 +47,16 @@ Some of the functions declared in this header are replaceable. The implementatio
4647
|[operator new](../standard-library/new-operators.md#op_new)|The function called by a new expression to allocate storage for individual objects.|
4748
|[operator new&#91;&#93;](../standard-library/new-operators.md#op_new_arr)|The function called by a new expression to allocate storage for an array of objects.|
4849

50+
### Enums
51+
|-|-|
52+
|[align_val_t](../standard-library/new-operators.md
53+
4954
### Classes
5055

5156
|Class|Description|
5257
|-|-|
5358
|[bad_alloc Class](../standard-library/bad-alloc-class.md)|The class describes an exception thrown to indicate that an allocation request did not succeed.|
59+
|[bad_array_new_length Class](../standard-library/bad-array-new-length-class.md)||
5460
|[nothrow_t Class](../standard-library/nothrow-t-structure.md)|The class is used as a function parameter to operator new to indicate that the function should return a null pointer to report an allocation failure, rather than throw an exception.|
5561

5662
## See also

0 commit comments

Comments
 (0)