Reflection without Reflection in C++ - Current Techniques and Possibilities
Offered By: Meeting Cpp via YouTube
Course Description
Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore advanced reflection techniques in C++ without relying on the Reflection TS in this 39-minute conference talk from Meeting C++ 2022. Discover ingenious methods to implement reflection using current C++ features, including template/function specialization, template argument deduction, and SFINAE. Learn how to count struct members, utilize structured bindings, and leverage std::tuple for struct reflection. Gain insights into clang's __builtin_dump_struct and even find out how to check if you're using tabs or spaces. Delve into these creative approaches that push the boundaries of C++ reflection capabilities while awaiting the official Reflection TS implementation.
Syllabus
Introduction
Template/function specialization
template argument deduction
Reflection technique #1: SFINAE
Quick refresher: What is SFINAE?
std::source_location::function_name
Struct reflection: counting the number of members
structured bindings
Struct reflection: std::tuple for struct's members
clang's __builtin_dump_struct
Checking if you are using tabs or spaces
Taught by
Meeting Cpp
Related Courses
Automated and Connected Driving ChallengesRWTH Aachen University via edX Basics in computer vision
Higher School of Economics via Coursera Build a Guessing Game Application using C++
Coursera Project Network via Coursera ะก/C++ for competitive programming
Moscow Institute of Physics and Technology via Coursera C++ Interacting with the World and Error Handling
Infosec via Coursera