Back to Basics: Master C++ Friendship - Mateusz Pusz - CppCon 2025 @CppCon
Back to Basics: Master C++ Friendship - Mateusz Pusz - CppCon 2025  @CppCon
Uploaded November 2025 | Updated November 2026, 2 days ago
cppcon.org
---

Back to Basics: Master C++ Friendship - Mateusz Pusz - CppCon 2025
---

C++ offers a rich set of access specifiers to control the visibility of class members. However, the friend keyword introduces a unique and often misunderstood concept. This talk explores the nuances of friendship, examining its role in code design, testing, and compilation performance optimization.

We'll delve into the intricacies of friendship, exploring its benefits and potential pitfalls. We'll examine how to leverage friendship effectively, discuss best practices, and uncover hidden gems and common misconceptions. We will see how friendship affects name lookup and compile-time error messages. We will discuss best practices for using it effectively and learn how to avoid or resolve compilation problems that may occur when C++ templates are involved.

By the end of this session, you'll have a solid grasp of friendship and be able to use it to write more elegant, efficient, and maintainable C++ code.

---

Slides: github.com/CppCon/CppCon2025/blob/main/Presentations/Back_To_Basics_Friendship.pdf

Work at Hudson River Trading (HRT): tinyurl.com/safxfctf
---

Mateusz Pusz

A software architect, principal engineer, and security champion with over 20 years of experience designing, writing, and maintaining C++ code for fun and a living. A trainer with over 15 years of C++ teaching experience, a consultant, a conference speaker, and an evangelist. His main areas of interest and expertise are Modern C++, code performance, low latency, safety, and maintainability.Mateusz worked at Intel for 13 years and is now a Principal Software Engineer and the head of the C++ Competency Center at EPAM Systems. He is also the founder of Train IT, which provides dedicated C++ training and consulting services to corporations worldwide.Mateusz contributes to and is an active voting member of the ISO C++ Committee (WG21), where he, along with the top C++ experts worldwide, shapes the future of the C++ language.
---

CppCon is the annual, week-long face-to-face gathering for the entire C++ community. The conference is organized by the C++ community for the community. You will enjoy inspirational talks and a friendly atmosphere designed to help attendees learn from each other, meet interesting people, and generally have a stimulating experience. Taking place this year in Aurora, Colorado, near the Denver airport, and including multiple diverse tracks, the conference will appeal to anyone from C++ novices to experts.
Annual CppCon Conference - cppcon.org
linkedin.com/company/cppcon
https://x.com/cppcon
facebook.com/CppConference
reddit.com/r/cppcon
https://mastodon.social/@CppCon
---

Videos Filmed & Edited by Bash Films: BashFilms.com
YouTube Channel Managed by Digital Medium Ltd: events.digital-medium.co.uk
---

#cpp #cplusplus #programming #coding #softwareengineering
Back to Basics: Master C++ Friendship - Mateusz Pusz - CppCon 2025Robust C++ Error Handling in C++26 - Sebastian Theophil - CppCon 2025It’s Dangerous to Go Alone: A Game Developer Tutorial - Michael Price - CppCon 2025Instrumenting the Stack: Strategies for End-to-end Sanitizer Adoption - Damien Buhl - CppCon 2025groov: Asynchronous Handling of Special Function Registers - Michael Caisse - CppCon 2025Is Your C++ Code Leaking Memory? Discover the Power of Ownership-Aware ProfilingLightning Talk: Better Expressiveness with Parallel Range Algorithms - Ruslan ArutyunyanBeyond the Big Green Button: Demystifying the Embedded Build Process - Morten Winkler JørgensenLightning Talk: Strategies for Developing Safety-Critical Software in C++ - Emily Durie-JohnsonConcept-based Generic Programming - Bjarne Stroustrup - CppCon 2025Could C++ Developers Handle an ABI Break Today? - Luis Caro Campos - CppCon 2025Cache Me Maybe: The Performance Secret Every C++ Developer Needs - Michelle DSouza - CppCon 2025
CppCon |

Back to Basics: Master C++ Friendship - Mateusz Pusz - CppCon 2025

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER