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
{{ message }}
Repository navigation
Commit 2e2e4f2
Browse filesBrowse the repository at this point in the historyBrowse files
You may also see errors in template metaprogramming, where conditional operator result types may change under **/Zc:ternary** and **/permissive-**. One way to resolve this issue is to use [std::remove_reference](../../standard-library/remove-reference-class.md) on the resulting type.
295
295
296
296
```cpp
297
-
// Example 4: different result types
297
+
// Example 4: different result types
298
298
externbool cond;
299
299
externint count;
300
-
char a = 'A';
301
-
constchar b = 'B';
302
-
decltype(auto) x = cond ? a : b; // char without, const char& with /Zc:ternary
303
-
const char (&z)[2] = count > 3 ? "A" : "B"; // const char* without /Zc:ternary
300
+
char a = 'A';
301
+
constchar b = 'B';
302
+
decltype(auto) x = cond ? a : b; // char without, const char& with /Zc:ternary
303
+
const char (&z)[2] = count > 3 ? "A" : "B"; // const char* without /Zc:ternary
304
304
```
305
305
306
306
#### Two-phase name look up (partial)
@@ -335,64 +335,108 @@ int main()
335
335
336
336
The **/permissive-** option is too strict for versions of the Windows Kits before Windows Fall Creators Update SDK (10.0.16299.0), or the Windows Driver Kit (WDK) version 1709. We recommend you update to the latest versions of the Windows Kits in order to use **/permissive-** in your Windows or device driver code.
337
337
338
-
Certain header files in the Windows Fall Creators Update SDK (10.0.16299.0), or the Windows Driver Kit (WDK) 1709, still have issues that make them incompatible with use of **/permissive-**. To work around these issues, we recommend you restrict the use of these headers to only those source code files that require them, and remove the **/permissive-** option when you compile those specific source code files. The following issues are specific to the Windows Fall Creators Update SDK (10.0.16299.0):
338
+
Certain header files in the Windows April 2018 Update SDK (10.0.17134.0), the Windows Fall Creators Update SDK (10.0.16299.0), or the Windows Driver Kit (WDK) 1709, still have issues that make them incompatible with use of **/permissive-**. To work around these issues, we recommend you restrict the use of these headers to only those source code files that require them, and remove the **/permissive-** option when you compile those specific source code files.
339
339
340
-
#### Issue in um\Query.h
340
+
These WinRT WRL headers released in the Windows April 2018 Update SDK (10.0.17134.0) are not clean with **/permissive-**. To work around these issues, either do not use **/permissive-**, or use **/permissive-** with **/Zc:twoPhase-** when working with these headers:
341
341
342
-
When using the **/permissive-** compiler switch, the `tagRESTRICTION` structure does not compile due to the case(RTOr) member 'or'.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\winrt\wrl\async.h(483): error C3861: 'TraceDelegateAssigned': identifier not found
346
+
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\winrt\wrl\async.h(491): error C3861: 'CheckValidStateForDelegateCall': identifier not found
347
+
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\winrt\wrl\async.h(509): error C3861: 'TraceProgressNotificationStart': identifier not found
348
+
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\winrt\wrl\async.h(513): error C3861: 'TraceProgressNotificationComplete': identifier not found
349
+
```
363
350
364
-
To address this issue, compile files that include Query.h without the **/permissive-** option.
351
+
- Issue in winrt/wrl/implements.h
365
352
366
-
#### Issue in um\cellularapi_oem.h
353
+
```Output
354
+
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt\wrl\implements.h(2086): error C2039: 'SetStrongReference': is not a member of 'Microsoft::WRL::Details::WeakReferenceImpl'
355
+
```
367
356
368
-
When using the **/permissive-** compiler switch, the forward declaration of `enum UICCDATASTOREACCESSMODE` causes a warning:
357
+
These User Mode headers released in the Windows April 2018 Update SDK (10.0.17134.0) are not clean with **/permissive-**. To work around these issues, do not use **/permissive-** when working with these headers:
The forward declaration of unscoped enum is a Microsoft extension. To address this issue, compile files that include cellularapi_oem.h without the **/permissive-** option, or use the [/wd](../../build/reference/compiler-option-warning-level.md) option to silence warning C4471.
361
+
```Output
362
+
C:\ProgramFiles(x86)\Windows Kits\10\include\10.0.17134.0\um\tune.h(139): error C3861: 'Release': identifier not found
363
+
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um\tune.h(559): error C3861: 'Release': identifier not found
364
+
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um\tune.h(1240): error C3861: 'Release': identifier not found
365
+
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um\tune.h(1240): note: 'Release': function declaration must be available as none of the arguments depend on a template parameter
366
+
```
375
367
376
-
####Issue in um\omscript.h
368
+
- Issue in um/spddkhlp.h
377
369
378
-
In C++03, a conversion from a string literal to BSTR (which is a typedef to 'wchar_t *') is deprecated but allowed. In C++11, the conversion is no longer allowed.
370
+
```Output
371
+
C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um\spddkhlp.h(759): error C3861: 'pNode': identifier not found
The forward declaration of unscoped enum is a Microsoft extension. To address this issue, compile files that include cellularapi_oem.h without the **/permissive-** option, or use the [/wd](../../build/reference/compiler-option-warning-level.md) option to silence warning C4471.
419
+
420
+
- Issue in um/omscript.h
421
+
422
+
In C++03, a conversion from a string literal to BSTR (which is a typedef to 'wchar_t *') is deprecated but allowed. In C++11, the conversion is no longer allowed.
0 commit comments