PragmaTwice opened a new pull request, #18117:
URL: https://github.com/apache/tvm/pull/18117

   Currently `for_each` accepts a callable with parameters typed `(size_t, 
Arg)`.
   
   In this PR we extend it to three kinds of parameter types:
   - `(size_t, Arg)`: same as original one
   - `(Arg)`: `size_t` can be omitted if possible
   - `(std::integral_constant<size_t, I>, Arg)`: the index is passed as a 
`constexpr` value so that it can be used in template arguments (e.g. for 
`std::get<I>`) and `if constexpr`s.
   
   Also as a demonstration we replace the `struct Arg2Str` with a simple 
`for_each` call.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to