The Curious Engineer

All blogs / C++

Andrzej's C++ blog

akrzemi1.wordpress.com

Guidelines and thoughts about C++

C++

Posts
146 from 1 Apr 2011 to 3 Dec 2025
Posting
now and then (3 in the last year)
Kind
personal blog
Feed
https://akrzemi1.wordpress.com/feed/

2025 4

  1. Structured iteration
  2. A new blog location
  3. Event-driven flows
  4. Concepts vs type traits

2024 1

  1. Class invariants

2023 2

  1. The double life of objects
  2. The obvious final step

2022 3

  1. A moved-from optional
  2. Local Time
  3. Using std::chrono

2021 2

  1. Concepts — case studies
  2. Decent concepts

2020 9

  1. Contracts, Preconditions & Invariants
  2. Semantic requirements in concepts
  3. Reflection for aggregates
  4. Concept archetypes — update
  5. Concept archetypes
  6. Ordering by constraints
  7. Requires-clause — updated
  8. Requires-clause
  9. Requires-expression

2019 5

  1. Short-circuiting in meta-functions
  2. String literals make bad ranges
  3. Operation cancelling and std::fstream
  4. Handling errors is canceling operations
  5. (Not) using namespace std;

2018 8

  1. Deducing your intentions
  2. Treating symptoms instead of the cause
  3. Faces of undefined behavior
  4. Functions in std
  5. Rvalues redefined
  6. Testing C++ online
  7. String’s competing constructors
  8. Help the compiler warn you

2017 12

  1. A friendly type predicate
  2. Your own type predicate
  3. error codes — some clarifications
  4. Using error codes effectively
  5. Your own error condition
  6. Your own error code
  7. Compile-time string concatenation
  8. Asserts in constexpr functions
  9. The GCC bug affects you
  10. A serious bug in GCC
  11. Toggles in functions
  12. (Not) detecting bugs

2016 12

  1. More const — fewer bugs
  2. Concealing bugs
  3. The One-Definition Rule
  4. Concepts Lite vs enable_if
  5. Is constructible?
  6. The cost of std::initializer_list
  7. Competing constructors
  8. Diagnosable validity
  9. Sessions and object lifetimes
  10. Concepts without Concepts
  11. Another polymorphism
  12. A customizable framework

2015 16

  1. Overload resolution
  2. More than you need
  3. Declaring the move constructor
  4. Special member functions
  5. Can you see the bug?
  6. code::dive — call for papers
  7. Efficient optional values
  8. Set-up and tear-down
  9. Handling short codes — part II
  10. Handling short codes — part I
  11. A clever comment style
  12. String’s interface
  13. Bug of the week
  14. A conditional copy constructor
  15. Desired compile-time failures
  16. Defensive programming

2014 19

  1. Using assertions
  2. A gotcha with ptr_vector
  3. A gotcha with Optional
  4. Boost Library Incubator
  5. Designing a generic library
  6. Destructors — 2 use cases
  7. On operator<
  8. Inadvertent conversions
  9. Inline functions
  10. Clever overloading
  11. Using variadic macros
  12. Ref-qualifiers
  13. Dangerous int-to-string conversions
  14. noexcept — what for?
  15. Common optimizations
  16. String’s length
  17. Find the bug — comments
  18. Find the bug
  19. Type erasure — Part IV

2013 15

  1. Type erasure — Part III
  2. Type erasure — Part II
  3. Type erasure — Part I
  4. Too perfect forwarding
  5. Value-initialization with C++
  6. Date Algorithms
  7. noexcept destructors
  8. C++’s best feature
  9. “constexpr” function is not “const”
  10. Intuitive interface — Part I
  11. Empty list initialization
  12. Preconditions — Part IV
  13. Preconditions — Part III
  14. Preconditions — Part II
  15. Preconditions — Part I

2012 17

  1. Constexpr unions
  2. (Not) using std::thread
  3. User-defined literals — Part III
  4. User-defined literals — Part II
  5. Why make your classes final?
  6. User-defined literals — Part I
  7. Quality Matters
  8. Beware of magic values!
  9. Constant initialization
  10. Using PODs in C++11
  11. Gotchas of type inference
  12. Meta-functions in C++11
  13. “Resource” or “session”?
  14. Value semantics
  15. Move Constructor — updated
  16. Concept axioms — what for?
  17. Type inference for temporaries

2011 21

  1. Null-state — part II
  2. Null-state — part I
  3. Functions that do nothing
  4. Lvalues, rvalues and references
  5. Value-initialization with Boost
  6. Parsing floats
  7. Using std::terminate
  8. Who calls std::terminate?
  9. Destructors that throw
  10. Move constructor — Q&A
  11. Move Constructor
  12. Parsing xml with Boost
  13. Brace, brace!
  14. Unique and shared ownership
  15. Using noexcept — upated
  16. Using noexcept
  17. Parsing strings at compile-time — Part II
  18. Parsing strings at compile-time — Part I
  19. Compile-time computations
  20. Assertions
  21. Hi everyone!