Skip to content

Fix try block enable mechanism #1185

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

Merged
merged 5 commits into from
Aug 14, 2025
Merged

Fix try block enable mechanism #1185

merged 5 commits into from
Aug 14, 2025

Conversation

SekaiArendelle
Copy link

  • Following is the prove:

In file included from D:\a\pltxt2htm\pltxt2htm\cmd..\include\fast_io/fast_io.h:10: In file included from D:\a\pltxt2htm\pltxt2htm\cmd..\include\fast_io\fast_io_hosted.h:19: In file included from D:\a\pltxt2htm\pltxt2htm\cmd..\include\fast_io\fast_io_freestanding.h:23: In file included from D:\a\pltxt2htm\pltxt2htm\cmd..\include\fast_io\fast_io_freestanding_impl/io_buffer/impl.h:8: D:\a\pltxt2htm\pltxt2htm\cmd..\include\fast_io\fast_io_freestanding_impl/io_buffer\destroy.h:41:3: error: cannot use 'try' with exceptions disabled
41 | try
| ^

Because

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:104:33: note: expanded from macro '_HAS_EXCEPTIONS'
104 | #define _HAS_EXCEPTIONS 1
| ^

Above build error occured in x86_64-windows-msvc-clang with -fno-exceptions flag

* Following is the prove:

In file included from D:\a\pltxt2htm\pltxt2htm\cmd\..\include\fast_io/fast_io.h:10:
In file included from D:\a\pltxt2htm\pltxt2htm\cmd\..\include\fast_io\fast_io_hosted.h:19:
In file included from D:\a\pltxt2htm\pltxt2htm\cmd\..\include\fast_io\fast_io_freestanding.h:23:
In file included from D:\a\pltxt2htm\pltxt2htm\cmd\..\include\fast_io\fast_io_freestanding_impl/io_buffer/impl.h:8:
D:\a\pltxt2htm\pltxt2htm\cmd\..\include\fast_io\fast_io_freestanding_impl/io_buffer\destroy.h:41:3: error: cannot use 'try' with exceptions disabled
   41 |                 try
      |                 ^

Because

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:104:33: note: expanded from macro '_HAS_EXCEPTIONS'
  104 |         #define _HAS_EXCEPTIONS 1
      |                                 ^
@trcrsired trcrsired merged commit 069b131 into cppfastio:next Aug 14, 2025
2 checks passed
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.

2 participants