2 ms·
For anyone wondering. The issue is that the line: World world(Dummy(value)); Can be interpreted as the following function declaration: World world(Dum
by rocqua 5y ago
For anyone wondering. The issue is that the line:
World world(Dummy(value));
Can be interpreted as the following function declaration:
World world(Dummy value);
As mentioned in child comment. This is sometimes called the most vexing parse: https://en.wikipedia.org/wiki/Most_vexing_parse https://en.wikipedia.org/wiki/Most_vexing_parse
It originates because C++ allows superfluous parentheses around function parameter declarations.