We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
C++ Features You Might Not Know - Jonathan Müller - NDC TechTown 2023
Discover little-known C++ features that can boost your programming skills, from lambda expressions to operators, unions, and more, in this comprehensive talk showcasing the complexities and quirks of the C++ language.
C++ Features You Might Not Know
- You can use a lambda that doesn’t capture anything implicitly convertible to a function pointer.
- The comma operator is useful for combining expressions.
- You can overload the comma operator for your iterator.
- A union of two UN32s with padding between the UN8s.
- The sign bit is set in Intel CPUs when you create a nan out of an operation.
-
The
statickeyword has multiple meanings. -
The
size ofoperator is useful for getting the size of an array. -
You can use
constexprto create a constexpr lambda. -
The
short circuitbehavior of logical operators can be useful. - You can use dynamic casts to get around covariant return types.
- The standard library has some weird stuff, such as macros that define rounding modes.
-
You can use
valarrayto create an array of values. -
The
SIMDtype is an array of values. - You can use lambdas with captures to create function pointers.
-
You can overload the
->operator to dereference a pointer to object. - You can use implicit conversions to get a function pointer from a lambda.
-
The
std::runtime_errorexception has awhat()function that returns astd::string. -
You can use
autoto deduce the type of a variable. -
The
(round())macro in C++ is used to round numbers. -
You can use the
std::valarrayclass to create an array of values. -
The
ssize_ttype is an alias forintin some systems. -
You can use the
VS.ymlfile to configure Valgrind. -
The
clangcompiler tells you if you have undefined behavior. -
The
sscanffunction is used to read from a string. -
The
VA_ARGSmacro is used to pass arguments to a function. -
You can use the
std::coutobject to print to the console. -
You can use the
macro to print to the console with automatic formatting. -
The
std::coutobject has anoperator void()function. -
The
VA_ARGSmacro is used to pass arguments to a function. -
You can use the
std::coutobject to print to the console with automatic formatting. -
The
std::coutobject has anoperator void()function. -
The
std::coutobject can be used to print to the console with automatic formatting.