Reasons for Using C++ 17

Using the logic that we should use tools that are as simple as possible and only adopt complexity where it is absolutely necessary, it feels like I could use a very early version of C++. What follows are the reasons why I have increased that to C++17. The idea will be to only use these feature and no more. Any new use will be add to this page.

#if !((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
    #error Requires C++17 or higher
Continue reading “Reasons for Using C++ 17”

Asking Stack Overflow the best way to do Template Specialisation

In learning C++ I dug in and tried to use classes and templates to solve what feels like a typical use case. I found that what I needed was Template Specialisation and that C++ does not support this very well. I came up with 3 different methods and wanted to check what others though was we the best approach. If there was a “preferred idiom in C++”, or an even better solution.

Continue reading “Asking Stack Overflow the best way to do Template Specialisation”