Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    This solution is simple and valid! But: 1. While being similar to template method - it provides no quick IDE hints about underlying type. 2. Hint render namespace resolutions for both typenames which makes it even less readable. 3. Being splitted in 2 aliases. 4. Less generic than template method. Thank you! Commented Feb 13 at 15:50
  • @intmain If you name the type properly, you don't need to see the underlying type. This technique is valuable because it applies to many situations where building up a type by steps is more understandable. Commented Feb 13 at 18:08
  • @Rud48, sure every solution has its pros and cons. Just listed noticeable traits of this particular one, so it will be easier for future me and others to pick their most suitable solution. Commented Feb 13 at 18:55