0%

This is my learning notes from the course - Mastering C++ Standard Library Features.

Computations on Types

  • Manipulation of types and type lists
  • template metaprogramming
  • Metaprogramming utilities in the Standard Library
  • The “type-value encoding“ idiom

Metafunctions

  • The idea behind “type manipulation”
  • Metafunctions
  • Useful use cases
    Read more »

This is my learning notes from the course - Mastering C++ Standard Library Features.

Exceptions in constexpr Functions

  • How exceptions and throw interact with constexpr functions
  • Use case examples

The Rule

  • The C++ Standard mentions that try-catch block are not allowed in constexpr functions
    • This means that you will not be able to catch exceptions
  • However, throw expressions are allowed
    • What does it mean to throw an exception at compile-time?
      Read more »

This is my learning notes from the course - Mastering C++ Standard Library Features.

constexpr in the Standard Library

  • constexpr in the Standard Library (C++11/14/17)
  • Use case examples

Why?

  • Having the Standard Library support constexpr algorithms and data structures out-of-the-box:
    • Allows people to reuse familiar abstractions for compile-time programming
    • Reduces separation of the community (For example: constexpr libraries versus run-time libraries)
      Read more »

This is my learning notes from the course - Mastering C++ Standard Library Features.

Programming at Compile-Time

  • Compile-time computations with constexpr
  • Manipulation of variadic template type lists
  • Standard Library features focused on metaprogramming

Constant Expressions

  • What constant expression means?
  • constexpr in C++11/14/17
  • Practical use cases of constexpr functions
    Read more »

This is my learning notes from the course - Mastering C++ Standard Library Features.

Safer Interfaces with Higher-Order Functions

  • How higher-order functions can make interfaces safer
  • Using the Standard Library in conjunction with higher-order functions to create safer abstractions

Higher-Order Functions and Safety

  • Higher-order functions allow interface designers to restrict the operations that an user can access at given time
  • Classes that have some sort of “null state” and related preconditions can usually benefit from higher-order functions in their interface
    Read more »