Describe the bug
When a namespaced function uses std::string, the generated rs cannot correctly reference ToCppString
To Reproduce
#include <string>
namespace test{
std::string test(std::string value){
return value;
};
}
use autocxx::prelude::*;
include_cpp! {
#include "test.h"
safety!(unsafe_ffi)
generate!("test::test")
}
Expected behavior
The generated code is as follows
pub mod test {
#[allow(unused_imports)]
use super::{bindgen, cxxbridge, output};
pub fn test(value: impl ToCppString) -> cxx::UniquePtr<cxx::CxxString> {
cxxbridge::test_autocxx_wrapper_0xf5230f3da42bdc87(value.into_cpp())
}
}
use super::{bindgen, cxxbridge, output};
ToCppString is not introduced
Additional context
Add any other context about the problem here.