Category: Technology



Most C and C++ programmers know the conventions for distributing declarations and definitions among headers and source files. However, there are exceptions to these conventions that we often chalk up to “linker magic”. If the linker can’t deal with multiply-defined symbols, how does it handle inline and constexpr functions? Why do explicit template specializations go into source files when most template code goes into headers? And what can embedded developers do to tell the linker to map certain code and data into specific memory regions? This session answers these questions by taking a detailed look at how the traditional C/C++ build model works with headers and source files. It describes what happens during each stage of the build process: preprocessing, compiling, instantiation, and linking. It explains what information the compiler records from declarations and definitions – including exceptional cases like inline and templates – and how the linker uses that information to generate an executable. It also shows how you can use explicit instantiation to control memory layout and reduce build times. Finally, this session walks an example program through the entire build process to demonstrate how everything fits together. This is **not** a session on C++20 Modules. However, it explains terms such as “translation unit” and “linkage” that are also part of the Modules framework, providing a solid foundation for understanding Modules. PUBLICATION PERMISSIONS:
CppCon Organizer provided Coding Tech with the permission to republish CppCon tech talks. CREDITS:
CppCon YouTube channel: https://www.youtube.com/channel/UCMlGfpWw-RUdWX_JbLCukXg https://www.youtube.com/watch?v=tjDfP8tQDyY



Which free scientific computing language is the fastest to program and execute? The answer probably won't surprise you because it's obvious. PUBLICATION PERMISSIONS:
Original video was published with the Creative Commons Attribution license (reuse allowed). Link: https://www.youtube.com/watch?v=pJIxVS-wlHc https://www.youtube.com/watch?v=K6bjkXeN0Wg



At Bloomberg, we have thousands of independently maintained first- and third-party C++ projects built with CMake. One of the keys to achieving this scale, while also keeping engineers productive, has been leveraging one of the most underrated and underutilized features of CMake — its extensibility via its module system. Bloomberg utilizes dozens of single-purpose CMake modules to allow its tens of thousands of CMakeLists.txt files to stay declarative, flexible, future-proof, and simple — all while using modern CMake principles! This talk will cover what CMake modules are, how to write one using the latest CMake features, and how to package one for others to use. Importantly, this talk will also cover when *not* to write a CMake module. If you find yourself wincing at all the repetitive boilerplate in the CMakeLists.txt across your projects, this is the talk for you! PUBLICATION PERMISSIONS:
CppCon Organizer provided Coding Tech with the permission to republish CppCon tech talks. CREDITS:
CppCon YouTube channel: https://www.youtube.com/channel/UCMlGfpWw-RUdWX_JbLCukXg https://www.youtube.com/watch?v=I6MLtoF5C1E