Re:C++20 Idioms for Parameter Packs
by shadedtriangle on Tuesday February 27, 2024 @03:00PM
(#39528982)
I feel like this article is missing one of the most useful idioms of parameter packs which is when you want to accept a variety of parameter types to a non-template function. You can stuff a parameter pack into an array/vector of unions/variants which is quite useful! For example it's the way to implement std::format which is based off Python's string.format().
https://godbolt.org/z/v5zo99aGe
[ Parent
| on HN ]