what is the difference between “constexpr” and “static constexpr” variables of the non-class type in a header file?
问题 I have a header file test.hxx which will be included in multiple translation units. The header file is as below: namespace program_exec { static constexpr int DEFAULT_VAL = 0; static constexpr char *name = "proc_exec"; } I have included this header file in multiple translation units (*.cxx) and it works fine. But removing the static infront of constexpr char* causes a linking error i.e, if I change the static constexpr char *name = "proc_exec" to constexpr char *name = "proc_exec"; I am