foonathan::blog()
Thoughts from a C++ library developer.
- 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
2023 6
2022 8
- Technique: Proof types to ensure preconditions
- New integer types I'd like to see
- malloc() and free() are a bad API
- Carbon's most exciting feature is its calling convention
- Tutorial: Preparing libraries for CMake FetchContent
- Technique: Recursive variants and boxes
- `saturating_add` vs. `saturating_int` -- new function vs. new type?
- Technique: Compile Time Code Generation and Optimization
2021 7
- I accidentally wrote a Turing-complete parsing library
- Tutorial: the CRTP Interface Technique
- C++20 concepts are structural: What, why, and how to change it?
- Tutorial: Interactive code snippets with Hugo and Compiler Explorer
- Implementation Challenge: Lossless, compact parse tree with iterative traversal
- Trivially copyable does not mean trivially copy constructible
- What is the unit of a text column number?
2020 7
- Tricks with Default Template Arguments
- `constexpr` is a Platform
- Technique: Immediately-Invoked Function Expression for Metaprogramming
- Implementation Challenge: Replacing std::move and std::forward
- Nifty Fold Expression Tricks
- Tutorial: C++20's Iterator Sentinels
- std::polymorphic_value + Duck Typing = Type Erasure
2019 3
2018 16
- Nested Optionals, Expected and Composition
- Inline Namespaces 101
- Tutorial: Managing Compiler Warnings with CMake
- Proposals to Fix the Spaceship Operator
- Mathematics behind Comparison #5: Ordering Algorithms
- Mathematics behind Comparison #4: Three-Way Comparison
- Mathematics behind Comparison #3: Ordering Relations in C++
- Mathematics behind Comparison #2: Ordering Relations in Math
- Let's Talk about std::optional and optional references
- Mathematics behind Comparison #1: Equality and Equivalence Relations
- A (Better) Taxonomy of Pointers
- optional in Containers Ⅱ — Not All std::vector Usages Are The Same
- Should You Put optional in a Container?
- Guidelines For Rvalue References In APIs
- Flexible issue management with Trello and IFTTT
- Guidelines for constructor and cast design
2017 16
- Implementation Challenge: Revisiting the visitor pattern
- Exceptions vs expected: Let's find a compromise
- What should be part of the C++ standard library?
- Write explicit constructors - but what about assignment?
- Thoughts on destructive move
- Operator precedence is broken
- Lazy evaluation of function arguments in C++
- Prefer nonmember, nonfriends?
- The year is 2017 - Is the preprocessor still needed in C++?
- cppast - A library to parse and work with the C++ AST
- std::string_view accepting temporaries: good idea or horrible pitfall?
- Implementation Challenge flag_set: Type-safe, hard to misuse bitmask
- Implementing a tuple_iterator
- The problem with policy-based design
- Implementing function_view is harder than you might think
- How to handle errors in constructors without exceptions?
2016 33
- My take on variant
- Tutorial: Conditionally disabling non-template functions
- Fixing std::initializer_list
- standardese documentation generator version 0.3: Groups, inline documentation, template mode & more
- Memory 0.6: Composition and Joint Allocators
- Function templates - deduce template arguments or pass explicitly?
- void foo(T& out) - How to fix output parameters
- Tutorial: Emulating strong/opaque typedefs in C++
- Type safe - Zero overhead utilities for more type safety
- Prevent precondition errors with the C++ type system
- How do I implement assertions?
- Implementation Challenge: Concepts in C++14
- Choosing the right error handling strategy
- Move Semantics and Default Constructors -- Rule of Six?
- Standardese documentation generator version 0.2: Entity linking, index generation & more
- Move Safety -- Know What Can Be Done in the Moved-From State
- Tutorial: Easy dependency management for C++ with CMake and Git
- Flexible error handling techniques in C++
- Standardese documentation generator version 0.1
- You (probably) do want `final` classes?
- You (probably) don't want `final` classes
- Issue driven development
- Standardese - a (work-in-progress) nextgen Doxygen
- How I have beaten Boost.Pool #4: About abstractions and algorithms
- How I have beaten Boost.Pool #3: Branches are bad
- (Awesome?) Allocator Additions - Thoughts regarding allocator proposals
- How I have beaten Boost.Pool #2: Inlining is key
- How I have beaten Boost.Pool #1: Introduction and profiling results
- Performing arbitrary calculations with the Concept TS
- Tutorial: Easily supporting CMake install and find_package()
- Memory 0.5: Better build system, Low-level Allocators, BlockAllocator & Your Feedback is needed
- Implementation Challenge: A count leading zeroes function
- One of C++ most underrated features: Namespace aliases
2015 7
- Implementation Challenge: Traits for Concepts with optional functionality
- Controlling overload resolution #4: SFINAE
- Controlling overload resolution #3: Tag dispatching
- Controlling overload resolution #2: Improving error messages for failed overload resolution
- Controlling overload resolution #1: Preventing implicit conversions
- AllocatorAwareContainer: Introduction and pitfalls of propagate_on_container_XXX defaults
- Memory 0.4: Polishing, Error handling, Storage, Traits, Documentation and more