Skip to content

Commit 99bfcd7

Browse files
committed
cpp reconcile pr13
1 parent 8a891c6 commit 99bfcd7

File tree

11 files changed

+111
-8
lines changed

11 files changed

+111
-8
lines changed

docs/standard-library/ciso646.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ ms.assetid: 9d570924-d299-4225-9a58-8c4c820f5903
99

1010
Includes the Standard C library header \<iso646.h> and adds the associated names to the `std` namespace.
1111

12+
> [!NOTE]
13+
> Use of this header is unnecessary in C++.
14+
1215
## Syntax
1316

1417
```cpp

docs/standard-library/condition-variable.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ Each class also has two methods that are used to notify a condition variable tha
5050

5151
- `notify_all` wakes up all of the threads that are waiting for the condition variable.
5252

53+
## Functions and Enums
54+
55+
```cpp
56+
void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
57+
58+
enum class cv_status { no_timeout, timeout };
59+
```
60+
5361
## See also
5462
5563
[Header Files Reference](../standard-library/cpp-standard-library-header-files.md)<br/>

docs/standard-library/cstdbool.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ ms.assetid: 44ccb8b2-d808-4715-8097-58ba09ab33ed
77

88
Includes the Standard C library header \<stdbool.h> and adds the associated names to the `std` namespace.
99

10+
> [!NOTE]
11+
> This header has been deprecated in C++ 17.
12+
1013
## Syntax
1114

1215
```cpp

docs/standard-library/ctgmath.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ms.assetid: ff521893-f445-4dc8-a2f6-699185bb7024
55
---
66
# &lt;ctgmath&gt;
77

8-
In effect, includes the C++ Standard Library headers \<ccomplex> and \<cmath>, which provide type-generic math macros equivalent to \<tgmath.h>.
8+
In effect, includes the C++ Standard Library headers \<complex> and \<cmath>, which provide type-generic math macros equivalent to \<tgmath.h>.
99

1010
## Syntax
1111

@@ -15,7 +15,7 @@ In effect, includes the C++ Standard Library headers \<ccomplex> and \<cmath>, w
1515

1616
## Remarks
1717

18-
The functionality of the Standard C library header \<tgmath.h> is provided by overloads in \<ccomplex> and \<cmath>.
18+
The functionality of the Standard C library header \<tgmath.h> is provided by overloads in \<complex> and \<cmath>.
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

docs/standard-library/filesystem-enumerations.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@ enum class file_type {
106106
|`socket`|7|Represents a socket on UNIX based systems. (Not supported.)|
107107
|`unknown`|8|Represents a file whose status cannot be determined.|
108108
109+
## <a name="perm_options"></a> perm_options
110+
111+
Includes values `replace`, `add`, `remove`, and `nofollow`.
112+
113+
```cpp
114+
enum class perm_options;
115+
```
116+
109117
## <a name="perms"></a> perms
110118

111119
Flags for file permissions. The supported values are essentially “readonly” and all. For a readonly file, none of the *_write bits are set. Otherwise the `all` bit (0x0777) is set.

docs/standard-library/filesystem-functions.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ These free functions in the [\<filesystem>](../standard-library/filesystem.md) h
2020
|[is_block_file](#is_block_file)|[is_character_file](#is_character_file)|[is_directory](#is_directory)|
2121
|[is_empty](#is_empty)|[is_fifo](#is_fifo)|[is_other](#is_other)|
2222
|[is_regular_file](#is_regular_file)|[is_socket](#is_socket)|[is_symlink](#is_symlink)|
23-
|[last_write_time](#last_write_time)|[permissions](#permissions)|[read_symlink](#read_symlink)|
24-
|[remove](#remove)|[remove_all](#remove_all)|[rename](#rename)|
25-
|[resize_file](#resize_file)|[space](#space)|[status](#status)|
26-
|[status_known](#status_known)|[swap](#swap)|[symlink_status](#symlink_status)|
27-
|[system_complete](#system_complete)|[temp_directory_path](#temp_directory_path)|[u8path](#u8path)|
23+
|[last_write_time](#last_write_time)|[permissions](#permissions)|[proximate](#proximate)|
24+
|[read_symlink](#read_symlink)|[relative](#relative)|[remove](#remove)|
25+
|[remove_all](#remove_all)|[rename](#rename)|[resize_file](#resize_file)|
26+
|[space](#space)|[status](#status)|[status_known](#status_known)|
27+
|[swap](#swap)|[symlink_status](#symlink_status)|[system_complete](#system_complete)|
28+
|[temp_directory_path](#temp_directory_path)|[u8path](#u8path)|[weakly_canonical](#weakly_canonical)|
2829

2930
## <a name="absolute"></a> absolute
3031

@@ -385,6 +386,14 @@ The functions set the permissions for the pathname designated by *pval* to `mask
385386
386387
If `mask & perms::add_perms` the functions set the permissions to `status(pval).permissions() | mask & perms::mask`. Otherwise, if `mask & perms::remove_perms` the functions set the permissions to `status(pval).permissions() & ~(mask & perms::mask)`. Otherwise, the functions set the permissions to `mask & perms::mask`.
387388
389+
## <a name="proximate"></a> proximate
390+
391+
```cpp
392+
path proximate(const path& p, error_code& ec);
393+
path proximate(const path& p, const path& base = current_path());
394+
path proximate(const path& p, const path& base, error_code& ec);
395+
```
396+
388397
## <a name="read_symlink"></a> read_symlink
389398

390399
```cpp
@@ -394,6 +403,14 @@ path read_symlink(const path& pval, error_code& ec);
394403
395404
The functions report an error and return `path()` if `!is_symlink(pval)`. Otherwise, the functions return an object of type `path` containing the symbolic link.
396405
406+
## <a name="relative"></a> relative
407+
408+
```cpp
409+
path relative(const path& p, error_code& ec);
410+
path relative(const path& p, const path& base = current_path());
411+
path relative(const path& p, const path& base, error_code& ec);
412+
```
413+
397414
## <a name="remove"></a> remove
398415

399416
```cpp
@@ -502,3 +519,10 @@ path u8path(InIt first, InIt last);
502519
```
503520

504521
The first function behaves the same as `path(source)` and the second function behaves the same as `path(first, last)` except that the designated source in each case is taken as a sequence of char elements encoded as UTF-8, regardless of the filesystem.
522+
523+
## <a name="weakly_canonical"></a> weakly_canonical
524+
525+
```cpp
526+
path weakly_canonical(const path& p);
527+
path weakly_canonical(const path& p, error_code& ec);
528+
```

docs/standard-library/filesystem.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ For more information and code examples, see [File System Navigation (C++)](../st
110110
|[copy_options](../standard-library/filesystem-enumerations.md#copy_options)|An enumeration that is used with [copy_file](../standard-library/filesystem-functions.md#copy_file) and determines behavior if a destination file already exists.|
111111
|[directory_options](../standard-library/filesystem-enumerations.md#directory_options)|An enumeration that specifies options for directory iterators.|
112112
|[file_type](../standard-library/filesystem-enumerations.md#file_type)|An enumeration for file types.|
113+
|[perm_options](../standard-library/filesystem-enumerations.md#perm_options)||
113114
|[perms](../standard-library/filesystem-enumerations.md#perms)|A bitmask type used to convey permissions and options to permissions|
114115
115116
## See also

docs/standard-library/mutex-functions.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ helpviewer_keywords: ["std::adopt_lock [C++]", "std::call_once [C++]", "std::def
1010
||||
1111
|-|-|-|
1212
|[adopt_lock](#adopt_lock)|[call_once](#call_once)|[defer_lock](#defer_lock)|
13-
|[lock](#lock)|[try_to_lock](#try_to_lock)|
13+
|[lock](#lock)|[swap](#swap)|[try_lock](#try_lock)|
14+
|[try_to_lock](#try_to_lock)|||
1415

1516
## <a name="adopt_lock"></a> adopt_lock Variable
1617

@@ -68,6 +69,19 @@ The arguments to the template function must be *mutex types*, except that calls
6869
6970
The function locks all of its arguments without deadlock by calls to `lock`, `try_lock`, and `unlock`. If a call to `lock` or `try_lock` throws an exception, the function calls `unlock` on any of the mutex objects that were successfully locked before rethrowing the exception.
7071
72+
## <a name="swap"></a> swap
73+
74+
```cpp
75+
template <class Mutex>
76+
void swap(unique_lock<Mutex>& x, unique_lock<Mutex>& y) noexcept;
77+
```
78+
79+
## <a name="try_lock"></a> try_lock
80+
81+
```cpp
82+
template <class L1, class L2, class... L3> int try_lock(L1&, L2&, L3&...);
83+
```
84+
7185
## <a name="try_to_lock"></a> try_to_lock Variable
7286
7387
Represents an object that can be passed to the constructor for [unique_lock](../standard-library/unique-lock-class.md) to indicate that the constructor should try to unlock the `mutex` that is also being passed to it without blocking.

docs/standard-library/mutex.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ A mutex type is also known as a *lockable type*. If it does not provide the memb
4848
|[mutex Class (C++ Standard Library)](../standard-library/mutex-class-stl.md)|Represents a mutex type. Use objects of this type to enforce mutual exclusion within a program.|
4949
|[recursive_mutex Class](../standard-library/recursive-mutex-class.md)|Represents a mutex type. In constrast to the `mutex` class, the behavior of calling locking methods for objects that are already locked is well-defined.|
5050
|[recursive_timed_mutex Class](../standard-library/recursive-timed-mutex-class.md)|Represents a timed mutex type. Use objects of this type to enforce mutual exclusion that has time-limited blocking within a program. Unlike objects of type `timed_mutex`, the effect of calling locking methods for `recursive_timed_mutex` objects is well-defined.|
51+
|[scoped_lock Class](../standard-library/scoped-lock-class.md)||
5152
|[timed_mutex Class](../standard-library/timed-mutex-class.md)|Represents a timed mutex type. Use objects of this type to enforce mutual exclusion that has time-limited blocking within a program.|
5253
|[unique_lock Class](../standard-library/unique-lock-class.md)|Represents a template that can be instantiated to create objects that manage the locking and unlocking of a `mutex`.|
5354

@@ -57,6 +58,8 @@ A mutex type is also known as a *lockable type*. If it does not provide the memb
5758
|----------|-----------------|
5859
|[call_once](../standard-library/mutex-functions.md#call_once)|Provides a mechanism for calling a specified callable object exactly once during execution.|
5960
|[lock](../standard-library/mutex-functions.md#lock)|Attempts to lock all arguments without deadlock.|
61+
|[swap](../standard-library/mutex-functions.md#swap)||
62+
|[try_lock](../standard-library/mutex-functions.md#try_lock)||
6063

6164
### Structs
6265

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: "scoped_lock Class"
3+
ms.date: "11/04/2016"
4+
f1_keywords: ["mutex/std::scoped_lock"]
5+
---
6+
# scoped_lock Class
7+
8+
## Syntax
9+
10+
```cpp
11+
template <class... MutexTypes>
12+
class scoped_lock {
13+
using mutex_type = Mutex; // If MutexTypes... consists of the single type Mutex
14+
explicit scoped_lock(MutexTypes&... m);
15+
explicit scoped_lock(MutexTypes&... m, adopt_lock_t);
16+
~scoped_lock();
17+
scoped_lock(const scoped_lock&) = delete;
18+
scoped_lock& operator=(const scoped_lock&) = delete;
19+
}
20+
```
21+
22+
## Requirements
23+
24+
**Header:** \<mutex>
25+
26+
**Namespace:** std
27+
28+
## See also
29+
30+
[Header Files Reference](../standard-library/cpp-standard-library-header-files.md)<br/>
31+
[\<mutex>](../standard-library/mutex.md)<br/>

0 commit comments

Comments
 (0)