Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSVC 14_0 stdndards and has-include corrections #1017

Merged
merged 5 commits into from
Aug 22, 2023
Merged

Conversation

ckormanyos
Copy link
Member

@ckormanyos ckormanyos commented Aug 22, 2023

The purpose of this PR is to handle trivial syntax improvements mentioned in #1016.

@ckormanyos
Copy link
Member Author

The lexical parser isn't into it.

fatal error C1012: unmatched parenthesis: missing ')'

I need to go with the former preprocessor stuff, or at least try it out first.

@ckormanyos
Copy link
Member Author

ckormanyos commented Aug 22, 2023

Well the code logic is OK and things are going green but I messed up the GHA logic a bit and a few too many runners are being run. So this will need one more logic fix on the YAML layer. Coming right up, ...

@jzmaddock
Copy link
Collaborator

The lexical parser isn't into it.

It does work: Boost.Config is using it for all compilers including vintage msvc: https://github.com/boostorg/config/blob/d483059795f8bf77120ee423d1660532223e5795/include/boost/config/detail/select_stdlib_config.hpp#L18

@ckormanyos
Copy link
Member Author

ckormanyos commented Aug 22, 2023

The lexical parser isn't into it.

Boost.Config is using it for all ...

Ahhh good save, John. I tried the line:

#if (defined(__has_include) && (__has_include(<stdfloat>)))

But the variation should be:

#if defined(__has_include)
#if __has_include(<stdfloat>)
#include <stdfloat>
#endif
#endif

@ckormanyos
Copy link
Member Author

good save, John

John (@jzmaddock) could we agree on?

#if defined(__has_include)
#if __has_include(<stdfloat>)
#include <stdfloat>
#endif
#endif

Cc: @mborland

@mborland
Copy link
Member

#if defined(__has_include)
#if __has_include(<stdfloat>)
#include <stdfloat>
#endif
#endif

That is the format that GCC recommends: https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005finclude.html

@ckormanyos
Copy link
Member Author

the format that GCC recommends

Great thank you Matt (@mborland). I will cycle this through, then:

#if defined __has_include
#  if __has_include (<stdfloat>)
#    include <stdfloat>
#  endif
#endif

@ckormanyos
Copy link
Member Author

Matt (@mborland) while we are at it, I used super-rudimentary logic on the YAML-ing. Would you please take a look and see if you can agree to that? Or can we do better?

@mborland
Copy link
Member

Matt (@mborland) while we are at it, I used super-rudimentary logic on the YAML-ing. Would you please take a look and see if you can agree to that? Or can we do better?

It looks good to me. Definitely more compact than making it own config for one compiler.

@ckormanyos
Copy link
Member Author

ckormanyos commented Aug 22, 2023

It looks good to me.

Thanks Matt. OK let's let this thing cycle through. It is cycling green even with recent changes in develop to denorm_min in Multiprecision. These are in Multiprecision's develop now.

I'm not sure if this is or is not expected. But I'm happy to observe that.

@ckormanyos
Copy link
Member Author

Single failure on drone to clone. Merging.

@ckormanyos ckormanyos merged commit 6caf005 into develop Aug 22, 2023
58 of 59 checks passed
@ckormanyos ckormanyos deleted the issue1016 branch August 22, 2023 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants