Hello C++ developers,
This is our third post related to the C++17 standard and rules to take the best of it.
This time, we added 6 new rules:
- S6025: Use “std::variant” instead of unions with non-trivial types
- S5995: “bind” should not be used
- S6021: Heterogeneous sorted containers should only be used with types that support heterogeneous comparison
- S6008: Fold expressions should be used instead of recursive template instantiations
- S6012: Redundant class template arguments should not be used
- S6024: Free functions should be preferred to member functions when accessing a container in a generic context
In total, it’s 31 rules that will help you write C++17 compliant code. From there, we will take a break and see what we can do for C++20 standard.