'static_if' in C++14
summary
implements static_if in C++14 as a header‑only library and shows working code on GitHub https://github.com/SuperV1234/meetingcpp2015/tree/master/1_StaticIf, using C++14 variable templates, integral_constant and generic lambdas to dispatch at compile time. Examples include a consume(type) demo that picks eat or drink without instantiating nonmatching branches and a recursive pack example; performance is zero‑overhead and code compiles. For production the uploader recommends boost Hana or fit by Paul FZ II.
AI-written summary · about
related talks
59mCombining C++17 Features
23mFunctional Programming in C++ (Run time vs Compile time types)
55mHow bad is meta-programming still today?
01h 02mEmbedded Friendly C++: Features That Make a Difference
01h 02mAn Overview of C++11/14, Part I
59mCombining C++17 Features
48mWhat is a static function but isn't a static function
54mModern Template Techniques
