top of page

Exploring std::span in C++20: A Practical Dive

I’m excited to share a new episode, and this one’s special—I’ve managed to release two episodes in just two weeks!

For me, that’s a big milestone. 😊


In this episode, we’re diving into one of the standout features of C++20: std::span.

If you’re unfamiliar, std::span is a non-owning view of a container.


It allows you to work seamlessly with contiguous memory, making your code cleaner, safer, and more expressive.


But rather than just explain the theory, we’re doing something different this time.


We'll solve a LeetCode problem using std::span to demonstrate its power.


The goal? Crafting the cleanest and most efficient solution while showcasing how std::span can simplify and improve real-world code.


This episode is a mix of theory, practicality, and problem-solving—all rolled into one.


I hope you enjoy it and learn something new!

Check it out, and feel free to share your thoughts or questions. Let's continue exploring the beauty of modern C++ together!


Happy coding! 🚀




Recent Posts

See All

Virtual Constexpr Functions

In the latest episode of the C++Next  series, we explore the fascinating world of constexpr polymorphism . This episode is packed with...

bottom of page