Understanding the Filter View to use it right

By Nicolai M. Josuttis

Filtering the elements of a collection is one of the most important applications of dealing with ranges and views.

Unfortunately, the filter view (available since C++20) is one of the most suprising C++ standard views. Even with simple use cases you can easily have: - Unexpected functional behavior - Suprising compile-time errors with cryptic error messages - Fatal runtime errors (without even noticing them)

There are (more or less) good reasons for the design of the filter view. However, for a successful filtering of elements knowing all these pitfalls is key.

Listen and learn things you would not expect but have to know when using the filter views and views in general. The talk will demonstrate all the issues with simple real-work examples and also explain the (more or less wise) motivation for the design.





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.