Tag Archives for " user defined literals "

A Recap on User Defined Literals

Published October 8, 2021 - 0 Comments

User defined literals were introduced in C++11, evolved in C++14 and C++17, and are a nice way to write more expressive code. The general idea behind user defined literals is that they allow to write a value and tack on a term describing what this value represents. For example: auto const quantity = 42_bottles_of_water; In […]