circle icon indicating copy to clipboard operation
circle copied to clipboard

some general questions about packs

Open samuelpmish opened this issue 2 years ago • 1 comments

Hi, I've been playing with some of the improved pack expansion tools in circle, and it seems like a really cool feature. My two questions are:

  1. Is there a way to expand packs inside a function parameter list? I didn't see any examples of this in this repo and wasn't able to figure it out on my own. See for example:

https://godbolt.org/z/z1K6WGcxK (specifically lines 15-17)

  1. Is it possible to make aliases for pack expressions? For example, in the compiler explorer code, @member_names(struct_t) appears about half a dozen times inside struct SoA { ... }; , is there a way to do something like
using names = @member_names(struct_t) ... ;

in the struct scope, to make the implementation cleaner?

samuelpmish avatar Apr 09 '22 17:04 samuelpmish

  1. Yes, there's an old feature to expand packs inside a function parameter list. But there's also a new feature that I'm polishing up. I'll write a README.md on that when it's ready. It's a big improvement.
  2. There's a new mechanism for setting the names of member pack declarations. I'll also put that in the upcoming readme. Hang tight for a bit.

seanbaxter avatar Apr 25 '22 00:04 seanbaxter