Template declaration of std.typecons.isTuple in -X JSON file.

monkyyy crazymonkyyy at gmail.com
Wed Jan 15 21:55:30 UTC 2025


On Wednesday, 15 January 2025 at 21:00:35 UTC, realhet wrote:
> On Wednesday, 15 January 2025 at 20:27:18 UTC, Steven 
> Schveighoffer wrote:
>> On Wednesday, 15 January 2025 at 12:01:21 UTC, realhet wrote:
>
>> Also seems like invalid syntax. Where does this come from?
>
> It's in std.typecons.d -> [git 
> link](https://github.com/dlang/phobos/blob/336bed6d8ffec74d117b755866c5bd22e3d610a1/std/typecons.d#L2278C4-L2279C18)
>
> It's in the declaration of enum isTuple(T) = ....

>> github: `f(Specs...)(Tuple!Specs tup)`

>> your post: `template f(Specs...)f(T.init);`

thats quite the important detail, its pattern matching


More information about the Digitalmars-d-learn mailing list