You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -21,7 +21,7 @@ Specifies that the executable shouldn't be marked compatible with CET Shadow Sta
21
21
22
22
## Remarks
23
23
24
-
Control-flow Enforcement Technology (CET) Shadow Stack is a computer processor feature that provides capabilities to defend against return-oriented programming (ROP) based malware attacks. For more information, see [Intel Control-flow Enforcement Technology Preview](https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf).
24
+
Control-flow Enforcement Technology (CET) Shadow Stack is a computer processor feature. It provides capabilities to defend against return-oriented programming (ROP) based malware attacks. For more information, see [A Technical Look at Intel’s Control-flow Enforcement Technology](https://software.intel.com/content/www/us/en/develop/articles/technical-look-control-flow-enforcement-technology.html).
25
25
26
26
The **`/CETCOMPAT`** linker option tells the linker to mark the binary as CET Shadow Stack-compatible. **`/CETCOMPAT:NO`** marks the binary as not compatible with CET Shadow Stack. If both options are specified on the command line, the last one specified is used. This switch is currently only applicable to x86 and x64 architectures.
27
27
@@ -37,7 +37,7 @@ Starting in Visual Studio 2019 version 16.7:
37
37
38
38
1. Select the **CET Shadow Stack Compatible** property.
39
39
40
-
1. In the dropdown control, choose **`Yes (/CETCOMPAT)`** to mark the binary as CET Shadow Stack compatible, or **`No (/CETCOMPAT:NO)`** to mark it as non-compatible.
40
+
1. In the dropdown control, choose **`Yes (/CETCOMPAT)`** to mark the binary as CET Shadow Stack compatible, or **`No (/CETCOMPAT:NO)`** to mark it as non-compatible.
Converts a UTC time represented by a **`struct`****tm** to a UTC time represented by a **time_t** type.
14
+
Converts a UTC time represented by a **`struct tm`** to a UTC time represented by a **`time_t`** type.
16
15
17
16
## Syntax
18
17
@@ -30,26 +29,24 @@ __time64_t _mkgmtime64(
30
29
31
30
### Parameters
32
31
33
-
*timeptr*\
34
-
A pointer to the UTC time as a **`struct`****tm** to convert.
32
+
*`timeptr`*\
33
+
A pointer to the UTC time as a **`struct tm`** to convert.
35
34
36
35
## Return Value
37
36
38
-
A quantity of type **__time32_t** or **__time64_t** representing the number of seconds elapsed since midnight, January 1, 1970, in Coordinated Universal Time (UTC). If the date is out of range (see the Remarks section) or the input can't be interpreted as a valid time, the return value is -1.
37
+
A quantity of type **`__time32_t`** or **`__time64_t`** representing the number of seconds elapsed since midnight, January 1, 1970, in Coordinated Universal Time (UTC). If the date is out of range (see the Remarks section) or the input can't be interpreted as a valid time, the return value is -1.
39
38
40
39
## Remarks
41
40
42
-
The **_mkgmtime32** and **_mkgmtime64** functions convert a UTC time to a **__time32_t** or **__time64_t** type representing the time in UTC. To convert a local time to UTC time, use **mktime**, **_mktime32**, and **_mktime64** instead.
41
+
The **`_mkgmtime32`** and **`_mkgmtime64`** functions convert a UTC time to a **`__time32_t`** or **`__time64_t`** type representing the time in UTC. To convert a local time to UTC time, use **`mktime`**, **`_mktime32`**, and **`_mktime64`** instead.
43
42
44
-
**_mkgmtime** is an inline function that evaluates to **_mkgmtime64**, and **time_t** is equivalent to **__time64_t**. If you need to force the compiler to interpret **time_t** as the old 32-bit **time_t**, you can define **_USE_32BIT_TIME_T**. We don't recommend it, because your application might fail after January 18, 2038, the maximum range of a 32-bit **time_t**. It's not allowed at all on 64-bit platforms.
43
+
**_mkgmtime** is an inline function that evaluates to **`_mkgmtime64`**, and **`time_t`** is equivalent to **`__time64_t`**. If you need to force the compiler to interpret **`time_t`** as the old 32-bit **`time_t`**, you can define **`_USE_32BIT_TIME_T`**. We don't recommend it, because your application might fail after January 18, 2038, the maximum range of a 32-bit **`time_t`**. It's not allowed at all on 64-bit platforms.
45
44
46
-
The time structure passed in is changed as follows, in the same way as it's changed by the **_mktime** functions: the **tm_wday** and **tm_yday** fields are set to new values based on the values of **tm_mday** and **tm_year**. Because the time is assumed to be UTC, the **tm_isdst** field is ignored.
45
+
The time structure passed in is changed as follows, in the same way as it's changed by the **`_mktime`** functions: the **`tm_wday`** and **`tm_yday`** fields are set to new values based on the values of **`tm_mday`** and **`tm_year`**. Because the time is assumed to be UTC, the **`tm_isdst`** field is ignored.
47
46
48
-
The range of the **_mkgmtime32** function is from midnight, January 1, 1970, UTC to 23:59:59 January 18, 2038, UTC. The range of **_mkgmtime64** is from midnight, January 1, 1970, UTC to 23:59:59, December 31, 3000, UTC. An out-of-range date results in a return value of -1. The range of **_mkgmtime** depends on whether **_USE_32BIT_TIME_T** is defined. When it's not defined, which is the default, the range is the same as **_mkgmtime64**. Otherwise, the range is limited to the 32-bit range of **_mkgmtime32**.
47
+
The range of the **`_mkgmtime32`** function is from midnight, January 1, 1970, UTC to 23:59:59 January 18, 2038, UTC. The range of **`_mkgmtime64`** is from midnight, January 1, 1970, UTC to 23:59:59, December 31, 3000, UTC. An out-of-range date results in a return value of -1. The range of **`_mkgmtime`** depends on whether **`_USE_32BIT_TIME_T`** is defined. When it's not defined, which is the default, the range is the same as **`_mkgmtime64`**. Otherwise, the range is limited to the 32-bit range of **`_mkgmtime32`**.
49
48
50
-
Both **gmtime** and **localtime** use a common static buffer for the conversion. If you supply this buffer to **_mkgmtime**, the previous contents are destroyed.
51
-
52
-
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
49
+
Both **`gmtime`** and **`localtime`** use a common static buffer for the conversion. If you supply this buffer to **`_mkgmtime`**, the previous contents are destroyed.
53
50
54
51
## Examples
55
52
@@ -98,7 +95,7 @@ Local Time: Thu Feb 15 17:14:52 2007
98
95
Greenwich Mean Time: Fri Feb 16 01:14:52 2007
99
96
```
100
97
101
-
The following example shows how the incomplete structure is filled out by **_mkgmtime**. It computes values for both the day of the week and of the year.
98
+
The following example shows how the incomplete structure is filled out by **`_mkgmtime`**. It computes values for both the day of the week and of the year.
|[`CDCRenderTarget::Attach`](#attach)|Attaches existing render target interface to the object|
31
+
|[`CDCRenderTarget::BindDC`](#binddc)|Binds the render target to the device context to which it issues drawing commands|
32
+
|[`CDCRenderTarget::Create`](#create)|Creates a `CDCRenderTarget`.|
33
+
|[`CDCRenderTarget::Detach`](#detach)|Detaches render target interface from the object|
34
+
|[`CDCRenderTarget::GetDCRenderTarget`](#getdcrendertarget)|Returns an [`ID2D1DCRenderTarget`](/windows/win32/api/d2d1/nn-d2d1-id2d1dcrendertarget) interface|
|[`CDCRenderTarget::operator ID2D1DCRenderTarget*`](#operator_id2d1dcrendertarget_star)|Returns an [`ID2D1DCRenderTarget`](/windows/win32/api/d2d1/nn-d2d1-id2d1dcrendertarget) interface|
42
41
43
42
### Protected Data Members
44
43
45
44
|Name|Description|
46
45
|----------|-----------------|
47
-
|[CDCRenderTarget::m_pDCRenderTarget](#m_pdcrendertarget)|A pointer to an ID2D1DCRenderTarget object.|
46
+
|[CDCRenderTarget::m_pDCRenderTarget](#m_pdcrendertarget)|A pointer to an [`ID2D1DCRenderTarget`](/windows/win32/api/d2d1/nn-d2d1-id2d1dcrendertarget) object.|
description: "enum used to specify how to handle ambiguous or nonexistent local times when resolving a time in a time zone"
4
+
ms.date: 09/16/2021
5
+
f1_keywords: ["chrono/std::choose"]
6
+
helpviewer_keywords: ["std::choose"]
7
+
---
8
+
9
+
# `choose` enum
10
+
11
+
Used with [`time_zone`](time-zone-class.md) and [`zoned_time`](zoned-time-class.md) to indicate how to handle ambiguous or nonexistent local times when resolving a time in a time zone.
12
+
13
+
## Syntax
14
+
15
+
```cpp
16
+
enumclasschoose { // C++ 20
17
+
earliest,
18
+
latest
19
+
};
20
+
```
21
+
22
+
### Members
23
+
24
+
|Element|Description|
25
+
|-|-|
26
+
| `earliest` | If a time conversion in a time zone is ambiguous or nonexistent, uses the earlier time point. |
27
+
| `latest` | If a time conversion in a time zone is ambiguous or nonexistent, uses the later time point. |
28
+
29
+
## Remarks
30
+
31
+
If a local time doesn't exist for the time zone, `earliest` and `latest` result in the same time point.
32
+
When `choose` isn't passed and an ambiguous or nonexistent time results, either the exception `std::chrono::ambiguous_local_time` or `std::chrono::nonexistent_local_time` is thrown, respectively.
33
+
34
+
## Requirements
35
+
36
+
**Header:** `<chrono>` (since C++20)
37
+
38
+
**Namespace:** `std::chrono`
39
+
40
+
Compiler option:[`/std:c++latest`](../build/reference/std-specify-language-standard-version.md) is required.
0 commit comments