And the Five Winners for the "C++20 STL Cookbook" are

Contents[Show]

Today, I want to present the five winners for the pdf of the book "C++20 STL Cookbook" by Bill Weinman.

 CoverBig

To get the book, you had to answer the following question by Bill Weinmann: "What are the major advantages of the C++20 format library over printf and iostream?". Here are the best five answers. Two answers were almost literally identical, but I had to decide for one of them.

Manali

1. Format () is clean, precise , flexible variadic template function in terms of its usage and code readability.
2. With iostream we use for example: std::cout, std::cin . This use of scope resolution (namespaces) and insertion / extraction operations is overcome with help of format function , improving performance and efficiency.
3. format() function provides type safety ,
Formatting options, supporting classes and objects , positional arguments.

Uzoochogu

 format

Gabriel

Disadvantages:
- not Type safe
- it is not extensible because it only supports a specific number of types.

Advantages:
- Type safe
- now extensible ( yay :D )
- readable
- easier to localize/translate

Roberto

printf

 

 

 

 

iostreams

 

 

 

 

format1

 

 

 

 

 

 

format2

 

 

 

 

 

 

 

 

 

 

Demo

Hyper

my answer is that the C++20 format library provides a rich set of formatting options that exceeds even that of prinf. It provides a positional arguments and is extensible to support more values and classes. It is like it was isnpired by Python str.format method.
the C++20 format() function is a variadic template function which provides type safety, along with the performance and efficiency advantages of iostream. the format library also provides vformat(), a type-erased interface that prevents generating multiple instances of complex template function for each combination of arguments.
the make_formate_arge() function creates a type-erased parameter stack to pass to vformat(), which does the heavy lifting of formatting the string. This is how the format() library operates so efficiently.

 

 

Thanks a lot to my Patreon Supporters: Matt Braun, Roman Postanciuc, Tobias Zindl, Marko, G Prvulovic, Reinhold Dröge, Abernitzke, Frank Grimm, Sakib, Broeserl, António Pina, Sergey Agafyin, Андрей Бурмистров, Jake, GS, Lawton Shoemake, Animus24, Jozo Leko, John Breland, Louis St-Amour, Venkat Nandam, Jose Francisco, Douglas Tinkham, Kuchlong Kuchlong, Robert Blanch, Truels Wissneth, Kris Kafka, Mario Luoni, Neil Wang, Friedrich Huber, lennonli, Pramod Tikare Muralidhara, Peter Ware, Daniel Hufschläger, Alessandro Pezzato, Evangelos Denaxas, Bob Perry, Satish Vangipuram, Andi Ireland, Richard Ohnemus, Michael Dunsky, Leo Goodstadt, John Wiederhirn, Yacob Cohen-Arazi, Florian Tischler, Robin Furness, Michael Young, Holger Detering, Bernd Mühlhaus, Matthieu Bolt, Stephen Kelley, Kyle Dean, Tusar Palauri, Dmitry Farberov, Juan Dent, George Liao, Daniel Ceperley, Jon T Hess, Stephen Totten, and Wolfgang Fütterer.

 

Thanks in particular to Jon Hess, Lakshman, Christian Wittenhorst, Sherhy Pyton, Dendi Suhubdy, Sudhakar Belagurusamy, Richard Sargeant, Rusty Fleming, Ralf Abramowitsch, John Nebel, Mipko, Alicja Kaminska, and Matthias Grün.

 

 

My special thanks to Embarcadero CBUIDER STUDIO FINAL ICONS 1024 Small

 

My special thanks to PVS-Studio PVC Logo

 

Seminars

I'm happy to give online seminars or face-to-face seminars worldwide. Please call me if you have any questions.

Bookable (Online)

German

Standard Seminars (English/German)

Here is a compilation of my standard seminars. These seminars are only meant to give you a first orientation.

New

Contact Me

Modernes C++,

RainerGrimmDunkelBlauSmall

 

 

 

Mentoring

Stay Informed about my Mentoring

English Books

Course: Modern C++ Concurrency in Practice

Course: C++ Standard Library including C++14 & C++17

Course: Embedded Programming with Modern C++

Course: Generic Programming (Templates)

Course: C++ Fundamentals for Professionals

Interactive Course: The All-in-One Guide to C++20

Subscribe to the newsletter (+ pdf bundle)

Blog archive

Source Code

Visitors

Today 3028

Yesterday 4105

Week 34046

Month 163551

All 10708667

Currently are 297 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments