The Curious Engineer

All blogs / C++

foonathan::blog()

foonathan.net/post

Thoughts from a C++ library developer.

C++

Posts
109 from 12 Sep 2015 to 20 Nov 2024
Posting
now and then
Kind
personal blog
Feed
https://www.foonathan.net/post/feed.xml

2024 6

  1. Trip Report: Fall ISO C++ Meeting in Wrocław, Poland
  2. if constexpr requires requires { requires }
  3. Trip Report: Summer ISO C++ Meeting in St. Louis, USA
  4. Trip Report: C++Now 2024
  5. Trip Report: Spring ISO C++ Meeting in Tokyo, Japan
  6. I'm the new assistant chair of SG 9, the study group for std::ranges!

2023 6

  1. C++ needs undefined behavior, but maybe less
  2. Compile-time sizes for range adaptors
  3. The new static constexpr std::integral_constant idiom
  4. Should we stop writing functions?
  5. Constrain your user-defined conversions
  6. Trip report: Summer ISO C++ Meeting in Varna, Bulgaria

2022 8

  1. Technique: Proof types to ensure preconditions
  2. New integer types I'd like to see
  3. malloc() and free() are a bad API
  4. Carbon's most exciting feature is its calling convention
  5. Tutorial: Preparing libraries for CMake FetchContent
  6. Technique: Recursive variants and boxes
  7. `saturating_add` vs. `saturating_int` -- new function vs. new type?
  8. Technique: Compile Time Code Generation and Optimization

2021 7

  1. I accidentally wrote a Turing-complete parsing library
  2. Tutorial: the CRTP Interface Technique
  3. C++20 concepts are structural: What, why, and how to change it?
  4. Tutorial: Interactive code snippets with Hugo and Compiler Explorer
  5. Implementation Challenge: Lossless, compact parse tree with iterative traversal
  6. Trivially copyable does not mean trivially copy constructible
  7. What is the unit of a text column number?

2020 7

  1. Tricks with Default Template Arguments
  2. `constexpr` is a Platform
  3. Technique: Immediately-Invoked Function Expression for Metaprogramming
  4. Implementation Challenge: Replacing std::move and std::forward
  5. Nifty Fold Expression Tricks
  6. Tutorial: C++20's Iterator Sentinels
  7. std::polymorphic_value + Duck Typing = Type Erasure

2019 3

  1. Naming Things: Implementer vs. User Names
  2. Standardese Documentation Generator: Post Mortem and My Open-Source Future
  3. Tutorial: When to Write Which Special Member

2018 16

  1. Nested Optionals, Expected and Composition
  2. Inline Namespaces 101
  3. Tutorial: Managing Compiler Warnings with CMake
  4. Proposals to Fix the Spaceship Operator
  5. Mathematics behind Comparison #5: Ordering Algorithms
  6. Mathematics behind Comparison #4: Three-Way Comparison
  7. Mathematics behind Comparison #3: Ordering Relations in C++
  8. Mathematics behind Comparison #2: Ordering Relations in Math
  9. Let's Talk about std::optional and optional references
  10. Mathematics behind Comparison #1: Equality and Equivalence Relations
  11. A (Better) Taxonomy of Pointers
  12. optional in Containers Ⅱ — Not All std::vector Usages Are The Same
  13. Should You Put optional in a Container?
  14. Guidelines For Rvalue References In APIs
  15. Flexible issue management with Trello and IFTTT
  16. Guidelines for constructor and cast design

2017 16

  1. Implementation Challenge: Revisiting the visitor pattern
  2. Exceptions vs expected: Let's find a compromise
  3. What should be part of the C++ standard library?
  4. Write explicit constructors - but what about assignment?
  5. Thoughts on destructive move
  6. Operator precedence is broken
  7. Lazy evaluation of function arguments in C++
  8. Prefer nonmember, nonfriends?
  9. The year is 2017 - Is the preprocessor still needed in C++?
  10. cppast - A library to parse and work with the C++ AST
  11. std::string_view accepting temporaries: good idea or horrible pitfall?
  12. Implementation Challenge flag_set: Type-safe, hard to misuse bitmask
  13. Implementing a tuple_iterator
  14. The problem with policy-based design
  15. Implementing function_view is harder than you might think
  16. How to handle errors in constructors without exceptions?

2016 33

  1. My take on variant
  2. Tutorial: Conditionally disabling non-template functions
  3. Fixing std::initializer_list
  4. standardese documentation generator version 0.3: Groups, inline documentation, template mode & more
  5. Memory 0.6: Composition and Joint Allocators
  6. Function templates - deduce template arguments or pass explicitly?
  7. void foo(T& out) - How to fix output parameters
  8. Tutorial: Emulating strong/opaque typedefs in C++
  9. Type safe - Zero overhead utilities for more type safety
  10. Prevent precondition errors with the C++ type system
  11. How do I implement assertions?
  12. Implementation Challenge: Concepts in C++14
  13. Choosing the right error handling strategy
  14. Move Semantics and Default Constructors -- Rule of Six?
  15. Standardese documentation generator version 0.2: Entity linking, index generation & more
  16. Move Safety -- Know What Can Be Done in the Moved-From State
  17. Tutorial: Easy dependency management for C++ with CMake and Git
  18. Flexible error handling techniques in C++
  19. Standardese documentation generator version 0.1
  20. You (probably) do want `final` classes?
  21. You (probably) don't want `final` classes
  22. Issue driven development
  23. Standardese - a (work-in-progress) nextgen Doxygen
  24. How I have beaten Boost.Pool #4: About abstractions and algorithms
  25. How I have beaten Boost.Pool #3: Branches are bad
  26. (Awesome?) Allocator Additions - Thoughts regarding allocator proposals
  27. How I have beaten Boost.Pool #2: Inlining is key
  28. How I have beaten Boost.Pool #1: Introduction and profiling results
  29. Performing arbitrary calculations with the Concept TS
  30. Tutorial: Easily supporting CMake install and find_package()
  31. Memory 0.5: Better build system, Low-level Allocators, BlockAllocator & Your Feedback is needed
  32. Implementation Challenge: A count leading zeroes function
  33. One of C++ most underrated features: Namespace aliases

2015 7

  1. Implementation Challenge: Traits for Concepts with optional functionality
  2. Controlling overload resolution #4: SFINAE
  3. Controlling overload resolution #3: Tag dispatching
  4. Controlling overload resolution #2: Improving error messages for failed overload resolution
  5. Controlling overload resolution #1: Preventing implicit conversions
  6. AllocatorAwareContainer: Introduction and pitfalls of propagate_on_container_XXX defaults
  7. Memory 0.4: Polishing, Error handling, Storage, Traits, Documentation and more