>>108587580
you can violate ODR, so u can put definitions inside class bodies. you also dont have to use extern with global variables, you can just define it multiple times and they all refer to the same memory. you can also define static variables inside class definitions. templates can also violate ODR. without inline here you would get linker errors if this header were included in multiple translation units. here is a stupid example.
// --- C.hh
#ifndef C_HH
#define C_HH
#include <unordered_map>
#include <string>
#include <optional>
using namespace std;
class C {
private:
static inline const unordered_map<int, string> m_ = {
Comment too long. Click here to view the full text.