What is the difference between Tuple and TypeTuple? I've looked at sample code in the library, but they look similar. How do I decide which to use? and is there a good reason why Tuple is in std.typecons but TypeTuple is in std.typetuple?
A Tuple
is a data type, consisting of a collection of fields that you specify.
A TypeTuple
is simply "a bunch of things" that the compiler knows about at compile time; it has no existence at run time.
(Contrary to its name, a TypeTuple
can hold pretty much anything -- not just types!)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With