Reputation: 15936
What's the difference between a typealias declaration in class vs its declaration inside a function?
Is there any performance detail?
Is it a good idea to use them inside functions?
Upvotes: 4
Views: 710
Reputation: 36295
The difference is just the scope. A declaration inside a function hides one from outside.
Since this is handled all by the compiler it has nothing to do with performance.
Use it, where it makes sense (from a scope view)
Upvotes: 8