Add SharedPtr<bool>
diff --git a/src/cxx.cc b/src/cxx.cc
index e5853b9..b15dcaa 100644
--- a/src/cxx.cc
+++ b/src/cxx.cc
@@ -537,6 +537,7 @@
#define FOR_EACH_SHARED_PTR(MACRO) \
FOR_EACH_NUMERIC(MACRO) \
+ MACRO(bool, bool) \
MACRO(usize, std::size_t) \
MACRO(isize, rust::isize) \
MACRO(string, std::string)
diff --git a/src/shared_ptr.rs b/src/shared_ptr.rs
index 2f75e23..9269e5a 100644
--- a/src/shared_ptr.rs
+++ b/src/shared_ptr.rs
@@ -214,6 +214,7 @@
};
}
+impl_shared_ptr_target_for_primitive!(bool);
impl_shared_ptr_target_for_primitive!(u8);
impl_shared_ptr_target_for_primitive!(u16);
impl_shared_ptr_target_for_primitive!(u32);
diff --git a/syntax/check.rs b/syntax/check.rs
index 52ee693..ded5c53 100644
--- a/syntax/check.rs
+++ b/syntax/check.rs
@@ -139,10 +139,10 @@
}
match Atom::from(&ident.rust) {
- None | Some(U8) | Some(U16) | Some(U32) | Some(U64) | Some(Usize) | Some(I8)
- | Some(I16) | Some(I32) | Some(I64) | Some(Isize) | Some(F32) | Some(F64)
- | Some(CxxString) => return,
- Some(Bool) | Some(Char) | Some(RustString) => {}
+ None | Some(Bool) | Some(U8) | Some(U16) | Some(U32) | Some(U64) | Some(Usize)
+ | Some(I8) | Some(I16) | Some(I32) | Some(I64) | Some(Isize) | Some(F32)
+ | Some(F64) | Some(CxxString) => return,
+ Some(Char) | Some(RustString) => {}
}
} else if let Type::CxxVector(_) = &ptr.inner {
cx.error(ptr, "std::shared_ptr<std::vector> is not supported yet");