While having a polemic discussion with a colleague regarding the use of static for data declared within h/hpp files whenever you choose to put the data in there, I was surprised to discover that:
const float a[100] = {1};
declared in a h/hpp does NOT throw a linker error if the header file is included by different translation units. At first I thought that it's because a is not used in either of them or because of some linker optimization, but even if I use a and build the debug configuration, still no linker error. I don't know why but I was sure that omitting static would throw a linker error in this scenario (I'm arguing it's always good practice to use static for data defined in headers and it's even better practice instead to not define big data (e.g. arrays) in headers in the first place, to avoid memory waste).
Am I remembering this wrong?