-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix for error: ‘size_t’ does not name a type #6721
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please adapt your commit to follow our commit guidelines and don't introduce any formatting changes unrelated to your commit.
It's not his fault, any recent - AudioPreprocessor(const AudioPreprocessor &) = delete;
+ AudioPreprocessor(const AudioPreprocessor &) = delete;
AudioPreprocessor &operator=(const AudioPreprocessor &) = delete; In #6511 I simply edited the line manually in order for CI to pass. |
@@ -6,6 +6,7 @@ | |||
#ifndef MUMBLE_MUMBLE_AUDIOPREPROCESSOR_H_ | |||
#define MUMBLE_MUMBLE_AUDIOPREPROCESSOR_H_ | |||
|
|||
#include <cstddef> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we could specify the namespace when using the datatype: std::size_t
It's actually recommended for C++ code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you still need to include that header though, no? I think it is the one defining both versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I think so. So can i do anything to help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<cstddef>
is only required to guarantee the datatype appears in the global namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that is correct. According to https://en.cppreference.com/w/cpp/types/size_t you need to include a header in order to have std::size_t
and one of the headers that defines it is cstddef
.
In fact, according to https://stackoverflow.com/a/36594716 cstddef
is required to define the namespaced version and only optionally may define the version in global namespace.
FIX(client): Build error with make -j$(nproc) note: ‘size_t’ is defined in header ‘’;