You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[cfg(not(feature))] is useful when a newer version of a C++ library dropped something, while we would like to support both new and old versions with Cargo feature flags.
The text was updated successfully, but these errors were encountered:
hombit
changed the title
#[cfg(not(feature))] inside #[cxx::bridge]
#[cxx::bridge] doesn't apply #[cfg(not(feature))]
Jan 3, 2024
It looks like
#[cfg(not(feature))]
is ignored by#[cxx::bridge]
, so the marked field would always exist:See this demo repo for a reproducible example.
#[cfg(not(feature))]
is useful when a newer version of a C++ library dropped something, while we would like to support both new and old versions with Cargo feature flags.The text was updated successfully, but these errors were encountered: