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
{{ message }}
Repository navigation
Commit eeabae7
Browse filesBrowse the repository at this point in the historyBrowse files
Use generic get<N> for pair, array and tuple_element (#572)
std::pair::get is defined as:
```cpp
template< std::size_t I, class T1, class T2 >
typename std::tuple_element<I, std::pair<T1,T2> >::type&
get( std::pair<T1, T2>& p ) noexcept;
```
Our rules wrote individual versions for `get<0>` and `get<1>`. This PR
adds the generic version `get<N>` as declared by the standard.
This PR also adds get for array and translates tuple_element.
---
Rust does not allow writing a rule as `get<N>(a0: (T1, T2)) { return a.N
}` with `N = {0, 1}`. So we need libcc2rs support for this. TupleElement
is the translation of `std::tuple_element` and TupleGet uses
TupleElement to translate `std::get`.
0 commit comments