Loading…
C++Now 2021 has ended
Back To Schedule
Tuesday, May 4 • 1:30pm - 3:00pm
Using Concepts: C++ Design in a Concept World (part 2 of 2)

Log in to save this to your schedule, view media, leave feedback and see who's attending!

The second 1/2 of a two part talk -- more focused on the writing of concepts and the design aspects.

In c++20 concepts have finally arrived. Despite long precedence for concepts via meta-programming in c++, concepts brings new facilities to the table. With implementations in compilers and standard library support we now need to step back and consider how to apply this new tool in real projects. How can we use standard library concepts for daily coding? How do we write concepts? How do we design libraries and frameworks with concepts?
This tutorial will climb up the concepts ladder: what's a concept, using concepts in code, reading concepts, writing concepts, and finally designing with concepts.  First we'll cover the basics of concepts, the concept and requires keywords. Then we'll explore the application of concepts from a library user point of view. Including as a variable declaration, return values, and function parameters. We look at Then we'll survey and apply c++20 standard library concepts to typical development of a typical c++ class.
Next the tutorial will dig into writing concepts. Taking a step by step approach we look at the details of concept definitions.  Refactoring std::sleep_for using concepts expand to types outside of std::chrono lets us zero in on concepts design alternatives for functions. And the creation of an interval concept provides an example of designing a library with multiple types using concepts.

Finally, we'll tie our new knowledge and look at some ways concepts can impact c++ designs.  We'll look back on what design is and the tools concepts bring.  How do concepts fit in with a multi-paradigm design world.  How do they compare to design principles like Liskov substitution that we currenlty use. Finally, we'll look at the serialization design pattern and see how concepts impact the tradeoffs involved.

Speakers
avatar for Jeff Garland

Jeff Garland

CrystalClear Software
Jeff Garland has worked on many large-scale, distributed software projects over the past 30+ years. The systems span many different domains including telephone switching, industrial process control, satellite ground control, ip-based communications, and financial systems. He has written... Read More →


Tuesday May 4, 2021 1:30pm - 3:00pm MDT
C