Skip to content

Commit e7390ec

Browse files
authored
Merge pull request #5355 from Rageking8/add-missing-code-blocks-and-fix-syntax-in-some-standard-library-references
Add missing code blocks and fix syntax in some standard library references
2 parents f3dd79c + 69eac81 commit e7390ec

File tree

4 files changed

+59
-52
lines changed

4 files changed

+59
-52
lines changed

docs/standard-library/basic-ostream-class.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: basic_ostream Class"
32
title: "basic_ostream Class"
4-
ms.date: "03/27/2019"
3+
description: "Learn more about: basic_ostream Class"
4+
ms.date: 03/27/2019
55
f1_keywords: ["ostream/std::basic_ostream", "ostream/std::basic_ostream::flush", "ostream/std::basic_ostream::put", "ostream/std::basic_ostream::seekp", "ostream/std::basic_ostream::sentry", "ostream/std::basic_ostream::swap", "ostream/std::basic_ostream::tellp", "ostream/std::basic_ostream::write"]
66
helpviewer_keywords: ["std::basic_ostream [C++]", "std::basic_ostream [C++], flush", "std::basic_ostream [C++], put", "std::basic_ostream [C++], seekp", "std::basic_ostream [C++], sentry", "std::basic_ostream [C++], swap", "std::basic_ostream [C++], tellp", "std::basic_ostream [C++], write"]
7-
ms.assetid: 5baadc65-b662-4fab-8c9f-94457c58cda1
87
---
98
# basic_ostream Class
109

@@ -449,12 +448,15 @@ int main()
449448

450449
The nested class describes an object whose declaration structures the formatted output functions and the unformatted output functions.
451450

452-
class sentry {
453-
public:
454-
explicit sentry(basic_ostream\<Elem, Tr>& _Ostr);
455-
operator bool() const;
456-
~sentry();
457-
};
451+
```cpp
452+
class sentry
453+
{
454+
public:
455+
explicit sentry(basic_ostream<Elem, Tr>& _Ostr);
456+
operator bool() const;
457+
~sentry();
458+
};
459+
```
458460

459461
### Remarks
460462

docs/standard-library/bernoulli-distribution-class.md

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: bernoulli_distribution Class"
32
title: "bernoulli_distribution Class"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: bernoulli_distribution Class"
4+
ms.date: 11/04/2016
55
f1_keywords: ["random/std::bernoulli_distribution", "random/std::bernoulli_distribution::reset", "random/std::bernoulli_distribution::p", "random/std::bernoulli_distribution::param", "random/std::bernoulli_distribution::min", "random/std::bernoulli_distribution::max", "random/std::bernoulli_distribution::operator()", "random/std::bernoulli_distribution::param_type", "random/std::bernoulli_distribution::param_type::p", "random/std::bernoulli_distribution::param_type::operator==", "random/std::bernoulli_distribution::param_type::operator!="]
66
helpviewer_keywords: ["std::bernoulli_distribution [C++]", "std::bernoulli_distribution [C++], reset", "std::bernoulli_distribution [C++], p", "std::bernoulli_distribution [C++], param", "std::bernoulli_distribution [C++], min", "std::bernoulli_distribution [C++], max", "std::bernoulli_distribution [C++], param_type", "std::bernoulli_distribution [C++], param_type"]
7-
ms.assetid: 586bcde1-95ca-411a-bf17-4aaf19482f34
87
---
98
# bernoulli_distribution Class
109

@@ -14,30 +13,30 @@ Generates a Bernoulli distribution.
1413

1514
```cpp
1615
class bernoulli_distribution
17-
{
16+
{
1817
public:
19-
// types
20-
typedef bool result_type;
21-
struct param_type;
22-
23-
// constructors and reset functions
24-
explicit bernoulli_distribution(double p = 0.5);
25-
explicit bernoulli_distribution(const param_type& parm);
26-
void reset();
27-
28-
// generating functions
29-
template <class URNG>
30-
result_type operator()(URNG& gen);
31-
template <class URNG>
32-
result_type operator()(URNG& gen, const param_type& parm);
33-
34-
// property functions
35-
double p() const;
36-
param_type param() const;
37-
void param(const param_type& parm);
38-
result_type min() const;
39-
result_type max() const;
40-
};
18+
// types
19+
typedef bool result_type;
20+
struct param_type;
21+
22+
// constructors and reset functions
23+
explicit bernoulli_distribution(double p = 0.5);
24+
explicit bernoulli_distribution(const param_type& parm);
25+
void reset();
26+
27+
// generating functions
28+
template <class URNG>
29+
result_type operator()(URNG& gen);
30+
template <class URNG>
31+
result_type operator()(URNG& gen, const param_type& parm);
32+
33+
// property functions
34+
double p() const;
35+
param_type param() const;
36+
void param(const param_type& parm);
37+
result_type min() const;
38+
result_type max() const;
39+
};
4140
```
4241

4342
### Parameters
@@ -161,6 +160,7 @@ The second constructor constructs an object whose stored parameters are initiali
161160
162161
Contains the parameters of the distribution.
163162
163+
```cpp
164164
struct param_type {
165165
typedef bernoulli_distribution distribution_type;
166166
param_type(double p = 0.5);
@@ -169,6 +169,7 @@ struct param_type {
169169
bool operator==(const param_type& right) const;
170170
bool operator!=(const param_type& right) const;
171171
};
172+
```
172173

173174
### Parameters
174175

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
---
2-
description: "Learn more about: <condition_variable> enums"
32
title: "<condition_variable> enums"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: <condition_variable> enums"
4+
ms.date: 11/04/2016
55
f1_keywords: ["condition_variable/std::cv_status"]
6-
ms.assetid: f261ad79-e25b-4afa-9f8a-909ce697e0d8
76
---
87
# `<condition_variable>` enums
98

109
## <a name="cv_status"></a> cv_status
1110

1211
Supplies symbolic names for the return values of the methods of class template [condition_variable](../standard-library/condition-variable-class.md).
1312

14-
class cv_status {
15-
no_timeout
16-
timeout
13+
```cpp
14+
enum class cv_status
15+
{
16+
no_timeout,
17+
timeout
1718
};
19+
```

docs/standard-library/negative-binomial-distribution-class.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: negative_binomial_distribution Class"
32
title: "negative_binomial_distribution Class"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: negative_binomial_distribution Class"
4+
ms.date: 11/04/2016
55
f1_keywords: ["random/std::negative_binomial_distribution", "random/std::negative_binomial_distribution::reset", "random/std::negative_binomial_distribution::k", "random/std::negative_binomial_distribution::p", "random/std::negative_binomial_distribution::param", "random/std::negative_binomial_distribution::min", "random/std::negative_binomial_distribution::max", "random/std::negative_binomial_distribution::operator()", "random/std::negative_binomial_distribution::param_type", "random/std::negative_binomial_distribution::param_type::k", "random/std::negative_binomial_distribution::param_type::p", "random/std::negative_binomial_distribution::param_type::operator==", "random/std::negative_binomial_distribution::param_type::operator!="]
66
helpviewer_keywords: ["std::negative_binomial_distribution [C++]", "std::negative_binomial_distribution [C++], reset", "std::negative_binomial_distribution [C++], k", "std::negative_binomial_distribution [C++], p", "std::negative_binomial_distribution [C++], param", "std::negative_binomial_distribution [C++], min", "std::negative_binomial_distribution [C++], max", "std::negative_binomial_distribution [C++], param_type", "std::negative_binomial_distribution [C++], param_type"]
7-
ms.assetid: 7f5f0967-7fdd-4578-99d4-88f292b4fe9c
87
---
98
# negative_binomial_distribution Class
109

@@ -224,15 +223,18 @@ The second constructor constructs an object whose stored parameters are initiali
224223
225224
Stores the parameters of the distribution.
226225
227-
struct param_type {
228-
typedef negative_binomial_distribution`<`result_type> distribution_type;
229-
param_type(result_type k = 1, double p = 0.5);
230-
result_type k() const;
231-
double p() const;
226+
```cpp
227+
struct param_type
228+
{
229+
typedef negative_binomial_distribution<result_type> distribution_type;
230+
param_type(result_type k = 1, double p = 0.5);
231+
result_type k() const;
232+
double p() const;
232233
233-
bool operator==(const param_type& right) const;
234-
bool operator!=(const param_type& right) const;
235-
};
234+
bool operator==(const param_type& right) const;
235+
bool operator!=(const param_type& right) const;
236+
};
237+
```
236238

237239
### Parameters
238240

0 commit comments

Comments
 (0)