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

added missing include of exception #1752

Merged
merged 1 commit into from
Dec 31, 2023

Conversation

m42e
Copy link
Contributor

@m42e m42e commented Dec 31, 2023

No description provided.

@yhirose
Copy link
Owner

yhirose commented Dec 31, 2023

@m42e thanks for the feedback. I have never had a compile error without on my development environments and on GitHub Actions CI. Could you explain more about it?

@m42e
Copy link
Contributor Author

m42e commented Dec 31, 2023

@yhirose without that include I get the following error:

[ 20%] Building CXX object util/CMakeFiles/util.dir/aaa.cpp.o
In file included from /Users/---/util/aaa.cpp:1:
In file included from /Users/---/util/aaa.h:1:
/Users/---/util/httplib.h:6654:17: error: calling 'current_exception' with incomplete return type 'exception_ptr'
 6654 |       auto ep = std::current_exception();
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/llvm/17.0.6/bin/../include/c++/v1/__exception/operations.h:38:41: note: 'current_exception' declared here
   38 | _LIBCPP_EXPORTED_FROM_ABI exception_ptr current_exception() _NOEXCEPT;
      |                                         ^
/usr/local/Cellar/llvm/17.0.6/bin/../include/c++/v1/__exception/operations.h:36:33: note: forward declaration of 'std::exception_ptr'
   36 | class _LIBCPP_EXPORTED_FROM_ABI exception_ptr;
      |                                 ^
In file included from /Users/---/util/aaa.cpp:1:
In file included from /Users/---/util/aaa.h:1:
/Users/---/util/httplib.h:6672:17: error: calling 'current_exception' with incomplete return type 'exception_ptr'
 6672 |       auto ep = std::current_exception();
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/llvm/17.0.6/bin/../include/c++/v1/__exception/operations.h:38:41: note: 'current_exception' declared here
   38 | _LIBCPP_EXPORTED_FROM_ABI exception_ptr current_exception() _NOEXCEPT;
      |                                         ^
/usr/local/Cellar/llvm/17.0.6/bin/../include/c++/v1/__exception/operations.h:36:33: note: forward declaration of 'std::exception_ptr'
   36 | class _LIBCPP_EXPORTED_FROM_ABI exception_ptr;
      |                                 ^
2 errors generated.
make[2]: *** [util/CMakeFiles/util.dir/aaa.cpp.o] Error 1
make[1]: *** [util/CMakeFiles/util.dir/all] Error 2
make: *** [all] Error 2

Compiling with llvm 17.0.6 on Mac OS (installed with brew)

@yhirose yhirose merged commit 65218ce into yhirose:master Dec 31, 2023
4 checks passed
@yhirose
Copy link
Owner

yhirose commented Jan 1, 2024

OK. Thanks for your contribution!

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