17 Jan
2023
17 Jan
'23
11:38 p.m.
Hi, On 1/15/23 15:59, Jan Rheinländer wrote:
in file include/cln/lfloat_class.h there is the line
static cl_LF_globals_init_helper cl_LF_globals_init_helper_instance;
Now as far as I can see this will instantiate an instance of class cl_LF_globals_init_helper in every object file that includes the header (https://stackoverflow.com/questions/11967502/okay-to-declare-static-global-v... seems to support this).
Wouldn't it be better to replace static by extern and define the instance in some .cc file?
This is not POD (plain old data). The point of this code is explained in 7f619754e2 by Alexey Sheplyakov. All my best, -richy.