 
      
    | You are here | quuxplusone.github.io | ||
| | | | | danlark.org | |
| | | | | Today we are going to talk about C++ basic std::pair class in a way how and why it is broken. Story std::pair first appeared in C++98 as a pretty basic class with a very simple semantics -- you have two types T1 and T2, you can write std::pair and access .first and .second members... | |
| | | | | mpark.github.io | |
| | | | | A visitation mechanism for `std::variant`. | |
| | | | | rodusek.com | |
| | | | | Getting the name of a type in C++ is a hassle. For something that should be trivially known by the compiler at compile-time, the closest thing we have to getting the type in a cross-platform way is to use std::type_info::name which is neither at compile-time, nor is it guaranteed to be human-readable. In fact, both GCC and Clang actually return the compiler's mangled name rather than the human-readable name we are used to. Let's try to make something better using the modern utilities from c++17 and a little creative problem solving! | |
| | | | | vickiboykis.com | |
| | | What are they? Why are they? | ||