Guard includes of standard library headers so users can use import std#1218
Guard includes of standard library headers so users can use import std#1218davidhunter22 wants to merge 1 commit intomicrosoft:mainfrom
Conversation
|
Thanks for the change! Adding modules to a project is new to me, so it will take a little bit of time for me to learn the things necessary to properly review this PR. In the meantime, can you add a cmake variable that controls |
|
I will add can you add a cmake variable that controls GSL_BUILD_USING_STD_MODULE and a test, I was just very wary about changing CMake stuff. I can do this in two ways.
Let me know which you would prefer. |
|
I did notice one issue with using GoogleTest. On MSVC it compiles with Unicode defined and with the "/J" and "UTF-8" flags set. The GSL tests compile with MultiByteCharacterSet and do not set "/J" and "UTF-8". I'm not sure this is compatible. It certainly complains about it when I use |
Feel free to submit the cmake option change as a separate PR. I don't think every test needs to be converted immediately, but I'd like to at least see one test in this PR that has
Please open a separate issue for this. |
|
On the "/J" and "UTF-8" flags I'm not sure I'm qualified to make an opinion. |
|
I will create a PR for the test |
Yes, I'm happy to link with compiler team to get clarification on this, I would just like a separate issue tracking the task (preferably with the diagnostic you get when mixing these flags when using modules). Edit: Basically, this should either be an issue reported in GSL or an issue reported to the Developer Community, let's start with GSL and I can escalate it if necessary. |
|
I am still on this. I am hoping the #1222 and CmakePresets.json changes land soon as that will make life a bit easier |
fixes #1217
This is an example of how issue #1217 could be fixed