This repository has been archived by the owner on Feb 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
error[E0428]: the name sentry
is defined multiple times
#29
Comments
https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.0/ostream-source.html 00056 template<typename _CharT, typename _Traits> 00116 class sentry; |
After a few hours, it didn't find what I wanted. I must have something wrong in the script.
#!/usr/bin/env bash
set -eu
clang-3.9 --std=c++11 -c __bindgen.ii
~/rust-bindgen/target/release/bindgen \
--output __bindgen.rs \
--enable-cxx-namespaces \
--whitelist-type octave.* \
--whitelist-function octave.* \
--use-core \
__bindgen.ii \
-- -v -x c++ -std=c++11 \
2>/dev/null
rustc ~/octh/bindgen.rs \
2>&1 \
| grep 'error\[E0428\]: the name `sentry` is defined multiple times'
# time creduce ./bindgen-bug.sh __bindgen.ii |
Oh, I see my script problem. I had created an ~/octh/bindgen.rs with this, hoping it would pick up a file local to the temporary creduce directory. Guess this doesn't work: #![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
extern crate core;
include!("__bindgen.rs"); Deleting that file, and switching back to: #!/usr/bin/env bash
set -eu
clang-3.9 --std=c++11 -c __bindgen.ii
~/rust-bindgen/target/release/bindgen \
--output __bindgen.rs \
--enable-cxx-namespaces \
--whitelist-type octave.* \
--whitelist-function octave.* \
--use-core \
--raw-line "extern crate core;" \
__bindgen.ii \
-- -v -x c++ -std=c++11 \
2>/dev/null
rustc __bindgen.rs \
2>&1 \
| grep 'error\[E0428\]: the name `sentry` is defined multiple times'
# time creduce ./bindgen-bug.sh __bindgen.ii |
namespace a {
template <typename, typename> class b;
template <typename, typename = int> class c;
class B {
typedef b<int, int> d;
};
class e {
B g;
};
template <typename, typename> class c : e { class sentry; };
template <typename f, typename h> class c<f, h>::sentry {};
template <typename, typename> class b { class sentry; };
template <typename f, typename h> class b<f, h>::sentry {};
}
class octave_diary_stream : a::c<char> {};
|
Fixed in bindgen. Just do a |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: