Open
Description
Had a problem with this example. The rc_inner struct has data members with lifetimes (manually_drop data_). That lifetime refers not to the rc_inner but to the outer class rc. This needs some special normalization.
What's the strategy? Simplest is to just error. But it seems we can implicitly provide lifetime parameters on rc_inner. Which ones? Only the ones used? All the ones in the surrounding class? When does naming rc_inner give it implicit lifetime arguments?
template<class T+>
class [[unsafe::send(false)]] rc
{
struct rc_inner;
rc_inner* unsafe p_;
struct rc_inner
{
manually_drop<T> data_;
std::size_t strong_;
std::size_t weak_;
explicit
rc_inner(T data) noexcept safe;
};
public:
explicit rc(T t) safe;
rc(rc const^ rhs) safe;
[[unsafe::drop_only(T)]] ~rc() safe;
T const^ operator*(self const^) noexcept safe {
return *self->p_->data_.get();
}
};
Metadata
Metadata
Assignees
Labels
No labels