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

For MSVC no exceptions builds do not use _CPPUNWIND #48

Open
DBJDBJ opened this issue Nov 14, 2020 · 5 comments
Open

For MSVC no exceptions builds do not use _CPPUNWIND #48

DBJDBJ opened this issue Nov 14, 2020 · 5 comments

Comments

@DBJDBJ
Copy link

DBJDBJ commented Nov 14, 2020

martinmoene/expected-lite#27 (comment)

Just a friendly "single place" reminder for all nonstd projects

@martinmoene
Copy link
Owner

martinmoene commented Nov 15, 2020

Replace

# if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)

with

# if _MSC_VER
#  include <vcruntime.h>  // for _HAS_EXCEPTIONS
# endif
# if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || (_HAS_EXCEPTIONS)

Plan:

  • Update releases below:
  • any-lite -xxx
  • atomic-lite (being developed)
  • bit-lite (NA)
  • boolean-lite (NA)
  • byte-lite (NA)
  • expected-lite - xxx/v0.6.0
  • invoke-lite (NA)
  • observer-ptr-lite (NA)
  • optional-bare - xxx
  • optional-fun-lite (NA)
  • optional-lite - xxx/v3.4.0
  • ring-span-lite (NA)
  • scope-lite (NA)
  • span-lite - xxx/v0.9.0
  • status-value-lite - xxx
  • string-view-lite - xxx/v1.7.0
  • type-lite (NA)
  • value-ptr-lite - xxx
  • variant-lite - xxx/v2.1.0

martinmoene added a commit to martinmoene/expected-lite that referenced this issue Nov 15, 2020
martinmoene added a commit to martinmoene/any-lite that referenced this issue Nov 15, 2020
martinmoene added a commit to martinmoene/optional-bare that referenced this issue Nov 15, 2020
martinmoene added a commit to martinmoene/optional-lite that referenced this issue Nov 15, 2020
martinmoene added a commit to martinmoene/span-lite that referenced this issue Nov 15, 2020
martinmoene added a commit to martinmoene/status-value-lite that referenced this issue Nov 15, 2020
martinmoene added a commit to martinmoene/string-view-lite that referenced this issue Nov 15, 2020
martinmoene added a commit to martinmoene/value-ptr-lite that referenced this issue Nov 15, 2020
martinmoene added a commit to martinmoene/variant-lite that referenced this issue Nov 15, 2020
@DBJDBJ
Copy link
Author

DBJDBJ commented Nov 15, 2020

Thanks, @martinmoene , great :)

Over here is my unfinished result on the subject of MS STL and /kernel.

Kind regards

@martinmoene
Copy link
Owner

Thanks

Will need some time to further the exceptional behaviour. Likely want to make it configurable under Windows to either use assert() or SEH.

Kind regards

@DBJDBJ
Copy link
Author

DBJDBJ commented Nov 15, 2020

Good, you made that decision,

SEH is intrinsic to Windows, thus your future customers, Windows teams using that /kernel switch will very likely expect nonstd to raise one or few Structured Exception.

Thanks ...

ps: since my readme.md over there is atrocious. I need to simplify it. I don't understand it myself.

martinmoene added a commit to martinmoene/expected-lite that referenced this issue Nov 15, 2020
martinmoene added a commit to martinmoene/expected-lite that referenced this issue Nov 15, 2020
martinmoene added a commit to martinmoene/any-lite that referenced this issue Nov 16, 2020
martinmoene added a commit to martinmoene/optional-bare that referenced this issue Nov 16, 2020
martinmoene added a commit to martinmoene/optional-lite that referenced this issue Nov 16, 2020
martinmoene added a commit to martinmoene/span-lite that referenced this issue Nov 16, 2020
martinmoene added a commit to martinmoene/status-value-lite that referenced this issue Nov 16, 2020
martinmoene added a commit to martinmoene/string-view-lite that referenced this issue Nov 16, 2020
martinmoene added a commit to martinmoene/variant-lite that referenced this issue Nov 16, 2020
martinmoene added a commit to martinmoene/any-lite that referenced this issue Nov 16, 2020
martinmoene added a commit to martinmoene/expected-lite that referenced this issue Nov 16, 2020
martinmoene added a commit to martinmoene/optional-bare that referenced this issue Nov 16, 2020
martinmoene added a commit to martinmoene/optional-lite that referenced this issue Nov 16, 2020
martinmoene added a commit to martinmoene/span-lite that referenced this issue Nov 16, 2020
martinmoene added a commit to martinmoene/status-value-lite that referenced this issue Nov 16, 2020
martinmoene added a commit to martinmoene/string-view-lite that referenced this issue Nov 16, 2020
martinmoene added a commit to martinmoene/value-ptr-lite that referenced this issue Nov 16, 2020
@DBJDBJ
Copy link
Author

DBJDBJ commented Nov 29, 2020

Will need some time to further the exceptional behavior. Likely want to make it configurable under Windows to either use assert() or SEH.

Well, the "fail fast" movement is certainly raising ... And any of the three (compilers) is here to oblige ...

ps: the side issue -- is this not a great real-life example of why sometimes single include file policy fails :) I mean no disrespect but now you need to travel around repositories and change things, instead of having one common header (single place) where one could change this kind of top-level issues. I am going back to the "single top-level set of headers" model. Ugh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants