Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

IIFE in C++ for Performance and Safety

CppNow via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore the concept of Immediately-Invoked Function Expressions (IIFE) in C++ and their applications for enhancing performance and safety in a 22-minute conference talk from CppNow. Discover how this technique, commonly used in JavaScript, can be applied to C++ programming to create local scopes for variables, preventing global scope pollution. Learn how IIFE can lead to cleaner, safer, and more performant code when initializing objects that require multiple steps. Delve into topics such as const initialization, return type deduction, object selection, and readability. Gain insights on when to use IIFE and when to avoid it, along with important considerations for optimization. Access the accompanying slides for a comprehensive understanding of the presented concepts.

Syllabus

Intro
Jason Turner
Const Initialization
Return Type Deduction
Object Selection.
Readability
When Not to use it
A Note About Optimization

Taught by

CppNow

Reviews

Start your review of IIFE in C++ for Performance and Safety

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.