Add missing <stdexcept>.#316
Open
BillyONeal wants to merge 1 commit into
Open
Conversation
Needed for std::logic_error.
Resolves many build failures on Ubuntu 24.04, similar to the following representative examples:
```console
/mnt/vcpkg-ci/b/libgo/src/c91da23096-01178f7311.clean/libgo/netio/unix/../../scheduler/../common/spinlock.h: In member function ‘void co::LFLock2::unlock()’:
/mnt/vcpkg-ci/b/libgo/src/c91da23096-01178f7311.clean/libgo/netio/unix/../../scheduler/../common/spinlock.h:103:24: error: ‘logic_error’ is not a member of ‘std’
103 | throw std::logic_error("libgo.spinlock unlock exception: state == false");
| ^~~~~~~~~~~
/mnt/vcpkg-ci/b/libgo/src/c91da23096-01178f7311.clean/libgo/netio/unix/../../scheduler/../common/spinlock.h:1:1: note: ‘std::logic_error’ is defined in header ‘<stdexcept>’; did you forget to ‘#include <stdexcept>’?
+++ |+#include <stdexcept>
1 | #pragma once
In file included from /mnt/vcpkg-ci/b/libgo/src/c91da23096-01178f7311.clean/libgo/netio/unix/../../scheduler/../task/task.h:4,
from /mnt/vcpkg-ci/b/libgo/src/c91da23096-01178f7311.clean/libgo/netio/unix/../../scheduler/processer.h:4:
/mnt/vcpkg-ci/b/libgo/src/c91da23096-01178f7311.clean/libgo/netio/unix/../../scheduler/../task/../common/anys.h: In static member function ‘static std::size_t co::Anys<Group>::Register(Constructor, Destructor)’:
/mnt/vcpkg-ci/b/libgo/src/c91da23096-01178f7311.clean/libgo/netio/unix/../../scheduler/../task/../common/anys.h:46:24: error: ‘logic_error’ is not a member of ‘std’
46 | throw std::logic_error("Anys::Register mustbe at front of new first instance.");
| ^~~~~~~~~~~
/mnt/vcpkg-ci/b/libgo/src/c91da23096-01178f7311.clean/libgo/netio/unix/../../scheduler/../task/../common/anys.h:9:1: note: ‘std::logic_error’ is defined in header ‘<stdexcept>’; did you forget to ‘#include <stdexcept>’?
8 | #include <assert.h>
+++ |+#include <stdexcept>
9 | #include <memory>
/mnt/vcpkg-ci/b/libgo/src/c91da23096-01178f7311.clean/libgo/netio/unix/../../scheduler/../task/../common/anys.h: In member function ‘T& co::Anys<Group>::get(std::size_t)’:
/mnt/vcpkg-ci/b/libgo/src/c91da23096-01178f7311.clean/libgo/netio/unix/../../scheduler/../task/../common/anys.h:64:24: error: ‘logic_error’ is not a member of ‘std’
64 | throw std::logic_error("Anys::get overflow");
| ^~~~~~~~~~~
/mnt/vcpkg-ci/b/libgo/src/c91da23096-01178f7311.clean/libgo/netio/unix/../../scheduler/../task/../common/anys.h:64:24: note: ‘std::logic_error’ is defined in header ‘<stdexcept>’; did you forget to ‘#include <stdexcept>’?
/mnt/vcpkg-ci/b/libgo/src/c91da23096-01178f7311.clean/libgo/netio/unix/../../scheduler/../task/../common/anys.h: In constructor ‘co::Anys<Group>::Anys()’:
/mnt/vcpkg-ci/b/libgo/src/c91da23096-01178f7311.clean/libgo/netio/unix/../../scheduler/../task/../common/anys.h:128:28: error: ‘logic_error’ is not a member of ‘std’
128 | throw std::logic_error("Anys::get call std::align error");
| ^~~~~~~~~~~
```
|
已收到您的邮件,如有问题会尽快给您回复.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Needed for std::logic_error.
Resolves many build failures on Ubuntu 24.04, similar to the following representative examples: