Skip to content

Commit 45ef172

Browse files
committed
formatting
1 parent 68756ad commit 45ef172

File tree

4 files changed

+32
-56
lines changed

4 files changed

+32
-56
lines changed

docs/standard-library/any-class.md

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@ The stored instance is called the contained value. Two states are the same if ei
1616
class any
1717
```
1818
19+
## Members
20+
1921
### Constructors
2022
21-
|Constructor|Description|
23+
|||
2224
|-|-|
2325
|[any](#any)|Constructs an object of type `any`.|
2426
25-
### Member functions
27+
### Functions
2628
27-
|Member function|Description|
29+
|||
2830
|-|-|
2931
|[emplace](#emplace)|Sets an any value.|
3032
|[has_value](#has_value)|Returns **true** if any has a value.|
@@ -34,17 +36,11 @@ class any
3436
3537
### Operators
3638
37-
|Operator|Description|
39+
|||
3840
|-|-|
3941
|[operator=](#op_eq)|Replaces the any with a copy of another any.|
4042
41-
## Requirements
42-
43-
**Header:** \<any>
44-
45-
**Namespace:** std
46-
47-
## <a name="any"></a> any::any
43+
## <a name="any"></a> any
4844
4945
Constructs an object of type `any`. Also includes a destructor.
5046
@@ -62,7 +58,7 @@ template <class T, class U, class... Args>
6258
~any();
6359
```
6460

65-
## <a name="emplace"></a> any::emplace
61+
## <a name="emplace"></a> emplace
6662

6763
Sets an any value.
6864

@@ -73,15 +69,15 @@ template <class T, class U, class... Args>
7369
decay_t<T>& emplace(initializer_list<U>, Args&&...);
7470
```
7571
76-
## <a name="has_value"></a> any::has_value
72+
## <a name="has_value"></a> has_value
7773
7874
Returns **true** if any has a value.
7975
8076
```cpp
8177
bool has_value() const noexcept;
8278
```
8379

84-
## <a name="op_eq"></a> any::operator=
80+
## <a name="op_eq"></a> operator=
8581

8682
Replaces the any with a copy of another any.
8783

@@ -94,34 +90,29 @@ template <class T>
9490

9591
### Parameters
9692

97-
|Parameter|Description|
98-
|---------------|-----------------|
99-
|*right*|The any being copied into the any.|
93+
*right*\
94+
The any being copied into the any.
10095

101-
## <a name="reset"></a> any::reset
96+
## <a name="reset"></a> reset
10297

10398
Resets an any.
10499

105100
```cpp
106101
void reset() noexcept;
107102
```
108103

109-
## <a name="swap"></a> any::swap
104+
## <a name="swap"></a> swap
110105

111106
Swaps two any objects.
112107

113108
```cpp
114109
void swap(any& rhs) noexcept;
115110
```
116111
117-
## <a name="type"></a> any::type
112+
## <a name="type"></a> type
118113
119114
Returns the any type.
120115
121116
```cpp
122117
const type_info& type() const noexcept;
123118
```
124-
125-
## See also
126-
127-
[&lt;any>](../standard-library/any.md)

docs/standard-library/any-functions.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ f1_keywords: ["any/std::any_cast", "any/std::make_any", "any/std::swap"]
55
---
66
# &lt;any&gt; functions
77

8-
||||
9-
|-|-|-|
10-
|[any_cast](#any_cast)|[make_any](#make_any)|[swap](#swap)|
11-
12-
## <a name="any_cast"></a> any_cast
8+
## <a name="any_cast"></a> any_cast
139

1410
Makes an object into an any.
1511

@@ -26,7 +22,7 @@ template<class T>
2622
T* any_cast(any* operand) noexcept;
2723
```
2824
29-
## <a name="make_any"></a> make_any
25+
## <a name="make_any"></a> make_any
3026
3127
Takes values and creates an any object.
3228
@@ -37,7 +33,7 @@ template <class T, class U, class... Args>
3733
any make_any(initializer_list<U> il, Args&& ...args);
3834
```
3935

40-
## <a name="swap"></a> swap
36+
## <a name="swap"></a> swap
4137

4238
Exchanges the elements of two objects any.
4339

@@ -47,11 +43,8 @@ void swap(any& left, any& right) noexcept;
4743
4844
### Parameters
4945
50-
|Parameter|Description|
51-
|---------------|-----------------|
52-
|*left*|An object of type `any`.|
53-
|*right*|An object of type `any`.|
54-
55-
## See also
46+
*left*\
47+
An object of type `any`.
5648
57-
[&lt;any>](../standard-library/any.md)
49+
*right*\
50+
An object of type `any`.

docs/standard-library/any.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,25 @@ helpviewer_keywords: ["<any>"]
88

99
Defines the class any and several supporting functions and classes.
1010

11-
## Syntax
11+
## Requirements
1212

13-
```cpp
14-
#include <any>
15-
```
13+
**Header:** \<any>
14+
15+
**Namespace:** std
16+
17+
## Members
1618

1719
### Functions
1820

19-
|Function|Description|
21+
|||
2022
|-|-|
2123
|[any_cast](../standard-library/any-functions.md#any_cast)|Makes an object into an any.|
2224
|[make_any](../standard-library/any-functions.md#make_any)|Takes values and creates an any object.|
2325
|[swap](../standard-library/any-functions.md#swap)|Exchanges the elements of two objects any.|
2426

2527
### Classes
2628

27-
|Class|Description|
29+
|||
2830
|-|-|
2931
|[any](../standard-library/any-class.md)|Stores any type that satisfies the constructor requirements or has no value.|
3032
|[bad_any_cast](../standard-library/bad-any-cast-class.md)|Objects thrown by a failed `any_cast`.|

docs/standard-library/bad-any-cast-class.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,14 @@ class bad_any_cast
1616
1717
### Member functions
1818
19-
|Member function|Description|
19+
|||
2020
|-|-|
2121
|[what](#what)|Returns the type.|
2222
23-
## Requirements
24-
25-
**Header:** \<any>
26-
27-
**Namespace:** std
28-
29-
## <a name="what"></a> bad_any_cast::what
23+
## <a name="what"></a> what
3024
3125
Returns the type.
3226
3327
```cpp
3428
const char* what() const noexcept override;
3529
```
36-
37-
## See also
38-
39-
[&lt;any>](../standard-library/any.md)

0 commit comments

Comments
 (0)