error[E0428]: the name sentry
is defined multiple times #1048
Closed
Description
opened on Sep 29, 2017
For Octave bindings, I need to interop with C++ std::string ctaggart/octh#28. Any recommendations of how to do this are appreciated. This is the first issue I'm up against that I'm not sure how to solve. ctaggart/octh#29
Input C/C++ Header
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> {};
Bindgen Invocation
#!/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
Actual Results
error[E0428]: the name `sentry` is defined multiple times
Expected Results
It compiles.
Activity