Paul Dreik: Using variable templates on a tiny problem

preview_player
Показать описание
In this talk, Paul demonstrates how variable templates introduced in C++14 can be used to enhance readability of a tiny problem encountered in his day job.

Recorded at StockholmCpp 0x29:

The event was kindly hosted by our SwedenCpp Pro Network Partner, Prevas.

Рекомендации по теме
Комментарии
Автор

You could just use unsigned int as template parameter, solving problem with things like -1, and use static_assert to set range of number of bits

infernumpegasus
welcome to shbcf.ru