use macro protect all throw function by okhowang · Pull Request #61 · gulrak/filesystem · GitHub
Skip to content

use macro protect all throw function - #61

Merged
gulrak merged 6 commits into
gulrak:masterfrom
okhowang:no-exception
Apr 7, 2020
Merged

use macro protect all throw function#61
gulrak merged 6 commits into
gulrak:masterfrom
okhowang:no-exception

Conversation

@okhowang

@okhowang okhowang commented Apr 7, 2020

Copy link
Copy Markdown
Contributor

fix #60
I use macro protect throw currently.
additionly, remove_all and recursive_directory_iterator::increment has a little change for ec processing

@okhowang okhowang changed the title use macro protect all throw function directly use macro protect all throw function Apr 7, 2020
@gulrak

gulrak commented Apr 7, 2020

Copy link
Copy Markdown
Owner

@okhowang

okhowang commented Apr 7, 2020

Copy link
Copy Markdown
Contributor Author

I think i would prefer early in the header something along the lines of:

#if !defined(GHC_WITH_EXCEPTIONS) && (defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND))
#define GHC_WITH_EXCEPTIONS
#endif

Then all other #if would become #ifdef GHC_WITH_EXCEPTIONS and someone with a compiler not using one of the macros to signal exception support can enable it with the define without setting macros in compiler private namespace.

And it is easier to expand if needed.

done

@gulrak

gulrak commented Apr 7, 2020

Copy link
Copy Markdown
Owner

@gulrak
gulrak merged commit 2ad75e1 into gulrak:master Apr 7, 2020
@gulrak gulrak added this to the v1.3.4 milestone Apr 8, 2020
@okhowang
okhowang deleted the no-exception branch May 4, 2020 04:11
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.

Support for -fno-exception

2 participants