/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

quuxplusone.github.io
| | simoncoenen.com

Using compile-time string hashing to generate type information in C++
4.6 parsecs

Travel
| |
| | 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!
5.3 parsecs

Travel
| |
| | baptiste-wicht.com

Variadic Templates C++11 introduced variadic template to the languages. This new feature allows to write template functions and classes taking an arbitrary number of template parameters. This a featur
4.8 parsecs

Travel
| |
| | www.cppstories.com

Variadic Templates from C++11 is probably not a feature that you use on a daily basis. But recently, I've come across one refactoring example where I've decided to give a try and apply variadics. Intro When I was doing some work in some old UI code I've noticed several similar lines of code that looked like that:
18.7 parsecs

Travel
|