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

include exception header for std::exception_ptr #2159

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

toge
Copy link
Contributor

@toge toge commented Sep 14, 2024

I met compilation errors on apple-clang 15.
Error messages are following.
This PR try to fix it.

[ 32%] Building CXX object CMakeFiles/drogon.dir/lib/src/RequestStream.cc.o
In file included from lib/src/RequestStream.cc:15:
In file included from lib/src/MultipartStreamParser.h:17:
lib/inc/drogon/RequestStream.h:95:38: error: no type named 'exception_ptr' in namespace 'std'; did you mean 'exception'?
    virtual void onStreamFinish(std::exception_ptr) = 0;
                                ~~~~~^~~~~~~~~~~~~
                                     exception
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__exception/exception.h:72:33: note: 'exception' declared here
class _LIBCPP_EXPORTED_FROM_ABI exception {
                                ^
In file included from lib/src/RequestStream.cc:15:
In file included from lib/src/MultipartStreamParser.h:17:
lib/inc/drogon/RequestStream.h:98:58: error: no member named 'exception_ptr' in namespace 'std'
    using StreamFinishCallback = std::function<void(std::exception_ptr)>;
                                                    ~~~~~^
lib/inc/drogon/RequestStream.h:102:45: error: unknown type name 'StreamFinishCallback'; did you mean 'StreamDataCallback'?
                                            StreamFinishCallback finishCb);
                                            ^~~~~~~~~~~~~~~~~~~~
                                            StreamDataCallback
lib/inc/drogon/RequestStream.h:97:11: note: 'StreamDataCallback' declared here
    using StreamDataCallback = std::function<void(const char *, size_t)>;
          ^

@an-tao an-tao merged commit f918ead into drogonframework:master Sep 19, 2024
34 checks passed
@toge
Copy link
Contributor Author

toge commented Sep 19, 2024

@an-tao
Thanks!

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