[CXX-2629] Remove requirement to set `/Zc:__cplusplus` in MSVC flags Created: 03/Jan/23 Updated: 28/Oct/23 Resolved: 12/Jan/23 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kevin Albertson | Assignee: | Kevin Albertson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Epic Link: | CXX-2622 | ||||||||
| Quarter: | FY24Q1 | ||||||||
| Description |
|
Scope
Background & Motivation The documentation currently notes it is required to configure with /Zc:__cplusplus to compile with MSVC for C++17. Adding it as a default removes an exception in the build for MSVC. |
| Comments |
| Comment by Githook User [ 14/Mar/23 ] |
|
Author: {'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}Message:
Note option requirements for <= 3.7.0. Note /EHsc is required for <= 3.7.0.
|
| Comment by Githook User [ 12/Jan/23 ] |
|
Author: {'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}Message:
Note option requirements for <= 3.7.0. Note /EHsc is required for <= 3.7.0.
|
| Comment by Githook User [ 12/Jan/23 ] |
|
Author: {'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}Message:
Note option requirements for <= 3.7.0. Note /EHsc is required for <= 3.7.0.
|
| Comment by Kevin Albertson [ 09/Jan/23 ] |
|
Also consider: rather than check __cplusplus in the source, consider checking the _MSVC_LANG when compiling with MSVC. See https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ |