Hacker News new | past | comments | ask | show | jobs | submit login
Sfinae, Immediate Context, Operator (cppstories.com)
14 points by ibobev on March 23, 2022 | hide | past | favorite | 1 comment



TLDR: they wrote a custom "operator <<" for printing a tuple, and got a compiler error (instead of SFINAE) when using std::tuple_size_v<T> instead of std::tuple_size<T>::value in declaration, because the compiler doesn't go inside tuple_size_v definition to find out that this is a substitution error.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: