filmov
tv
CppCon 2017: Arthur O'Dwyer “A Soupçon of SFINAE”

Показать описание
—
Following on Arthur's "Template Normal Programming" from CppCon 2016, this will be a concise cookbook of SFINAE recipes — ways of getting the compiler to do one thing in one circumstance and another thing in another circumstance. The recipes presented will include:
- Partial specialization of struct templates
- std::bool_constant
- std::conditional_t
- Expression SFINAE on return types (using decltype)
- Expression SFINAE in a defaulted template type parameter
- std::enable_if_t as a defaulted template type parameter
- Tag dispatch on std::true_type and std::false_type
- "Meta-tag-dispatch" on true and false as template non-type parameters
- priority_tag<N> for tag dispatch with "fallback" cases
- bool_if_t as a template non-type parameter
In each case, we'll show a real code example where the recipe is the clearest and best way to get the job done. This will draw on Arthur's recent "STL From Scratch".
—
Arthur O'Dwyer: Nominum, Core Engineering
Arthur O'Dwyer worked for many years at Green Hills Software, making the world's most optimizing C and C++ compilers. Now he works at Nominum in San Francisco. Arthur is the showrunner of the Bay Area C++ meetup, which meets practically every week these days.
—
*-----*
*-----*
Following on Arthur's "Template Normal Programming" from CppCon 2016, this will be a concise cookbook of SFINAE recipes — ways of getting the compiler to do one thing in one circumstance and another thing in another circumstance. The recipes presented will include:
- Partial specialization of struct templates
- std::bool_constant
- std::conditional_t
- Expression SFINAE on return types (using decltype)
- Expression SFINAE in a defaulted template type parameter
- std::enable_if_t as a defaulted template type parameter
- Tag dispatch on std::true_type and std::false_type
- "Meta-tag-dispatch" on true and false as template non-type parameters
- priority_tag<N> for tag dispatch with "fallback" cases
- bool_if_t as a template non-type parameter
In each case, we'll show a real code example where the recipe is the clearest and best way to get the job done. This will draw on Arthur's recent "STL From Scratch".
—
Arthur O'Dwyer: Nominum, Core Engineering
Arthur O'Dwyer worked for many years at Green Hills Software, making the world's most optimizing C and C++ compilers. Now he works at Nominum in San Francisco. Arthur is the showrunner of the Bay Area C++ meetup, which meets practically every week these days.
—
*-----*
*-----*
Комментарии