Authors

Miriam Castellanos

Editor and senior C++ engineer

Answers
21
Writes
Language, Standard Library, Templates, Performance, Concurrency, Standards
Reply-to
hello@cpp-next.com

Miriam Castellanos has written C++ for a living for sixteen years, most of them on a large simulation codebase that she helped move from C++03 to C++11, then to C++17 and C++20, one compiler upgrade at a time. She keeps a running list of the advice she had to unlearn on the way, and many of the guides here start from it.

As editor she writes the Language, Standard Library, Templates, Performance, Concurrency and Standards sections, edits every guide, and checks each code sample under the standard it names.

Answers 21, newest first

  1. Can a C++ destructor throw? What happens since C++11Language · · C++20
  2. C++ expression templates explained with a C++20 exampleTemplates · · C++20
  3. C++ generators: co_yield and std::generatorConcurrency · · C++23
  4. C++ int to string: to_string, format or to_chars, not itoaStandard Library · · C++17
  5. Strings as C++ template parameters with C++20 fixed_stringTemplates · · C++20
  6. C++ string to int: std::stoi or std::from_chars, not atoiStandard Library · · C++17
  7. C++ virtual functions: override, pure virtual and the trapsLanguage · · C++11
  8. C++20 concepts: how to write and use themStandards · · C++20
  9. C++ generic lambdas, template lambdas and function objectsTemplates · · C++20
  10. How to write comparators for std::sort and std::mapStandard Library · · C++20
  11. C++ move semantics: what std::move and && really doLanguage · · C++20
  12. C++ pass by value or const reference: the rule since C++17Performance · · C++20
  13. Rule of zero: the special members C++ writes for youLanguage · · C++20
  14. std::expected in C++23: return a value or an errorStandard Library · · C++23
  15. C++ map: std::map find, insert, erase and iterateStandard Library · · C++17
  16. std::optional in C++: how to use it and when not toStandard Library · · C++17
  17. std::println in C++23: print without std::cout or printfStandard Library · · C++23
  18. std::span in C++20: pass a view, not a pointer and a sizeStandard Library · · C++20
  19. std::thread and std::jthread: start, join and stop a threadConcurrency · · C++20
  20. std::variant in C++: std::visit, std::get and the trapsStandard Library · · C++17
  21. When to mark a move constructor noexcept in C++Performance · · C++20