What does T equals T mean in Generics

前端 未结 1 500
遥遥无期
遥遥无期 2021-01-20 01:32

I\'m studying apple\'s new language swift, and i looked at the Swift module,
and saw some generic classes have below statements:

extension ContiguousAr         


        
相关标签:
1条回答
  • 2021-01-20 02:03

    T is a reference to any type. This allows you to dynamically set a type for something... like an Array. T == T is like saying typeof(Int) == typeof(Int) in obj c

    0 讨论(0)
提交回复
热议问题