-
Notifications
You must be signed in to change notification settings - Fork 2.2k
chore: collect all #define PYBIND11_HAS_... macros in pybind11/detail/common.h
#5647
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,22 +12,12 @@ | |
|
|
||
| #include <string> | ||
|
|
||
| #ifdef __has_include | ||
| # if defined(PYBIND11_CPP17) | ||
| # if __has_include(<filesystem>) | ||
| # include <filesystem> | ||
| # define PYBIND11_HAS_FILESYSTEM 1 | ||
| # elif __has_include(<experimental/filesystem>) | ||
| # include <experimental/filesystem> | ||
| # define PYBIND11_HAS_EXPERIMENTAL_FILESYSTEM 1 | ||
| # endif | ||
| # endif | ||
| #endif | ||
|
|
||
| #if !defined(PYBIND11_HAS_FILESYSTEM) && !defined(PYBIND11_HAS_EXPERIMENTAL_FILESYSTEM) \ | ||
| && !defined(PYBIND11_HAS_FILESYSTEM_IS_OPTIONAL) | ||
| # error \ | ||
| "Neither #include <filesystem> nor #include <experimental/filesystem is available. (Use -DPYBIND11_HAS_FILESYSTEM_IS_OPTIONAL to ignore.)" | ||
| #if defined(PYBIND11_HAS_FILESYSTEM) | ||
|
||
| # include <filesystem> | ||
| #elif defined(PYBIND11_HAS_EXPERIMENTAL_FILESYSTEM) | ||
| # include <experimental/filesystem> | ||
| #else | ||
| # error "Neither #include <filesystem> nor #include <experimental/filesystem is available." | ||
| #endif | ||
|
|
||
| PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.