Hacker News new | past | comments | ask | show | jobs | submit login

For those who are confused: this allows you to associate a type with a number. You can always retrieve the type you previously stored via decltype(loophole(tag<N>{}))

I was aware that the C++ type checker had memory and even that it was Turing complete. This is still non-intuitive to me. Only an Uber C++ expert who knows exactly what constructs cause the type checker to retain memory would be able to design this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: