The Detection Idiom - A Simpler Way to SFINAE

By Marshall Clow

Hidden in the Library fundamentals Technical Specification, there is a section called "Detection idiom". The specification doesn’t really say what it is for, and it has not received a lot of notice.

That’s a shame. This is an amazingly powerful method for distinguishing between kinds of types. Writing SFINAE constraints is tedious and confusing, and this will make them much easier to do.

This session will introduce the detection idiom, talk about how it works, and then give examples on how to use it.

A basic knowledge of template meta-programming will be useful





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.