use super::imp;
#[repr(transparent)]
pub struct VaList<'a> {
internal: imp::VaList<'a>,
}
impl<'a> VaList<'a> {
pub unsafe fn get<T: VaPrimitive>(&mut self) -> T {
T::get(&mut self.internal)
}
}
pub trait VaPrimitive: 'static {
#[doc(hidden)]
unsafe fn get(_: &mut imp::VaList) -> Self;
}
#[allow(dead_code)]
mod check_core_types {
struct Foo<T: super::VaPrimitive>([T;0]);
struct Checks {
_ptr: Foo<*const u8>,
_usize: Foo<usize>,
_isize: Foo<isize>,
}
}