gwaldron / osgearth

3D Maps for OpenSceneGraph / C++14
https://www.pelicanmapping.com/home-1/opensource
Other
1.48k stars 774 forks source link

fix: weejobs macos build issues #2448

Closed remoe closed 6 months ago

remoe commented 6 months ago
gwaldron commented 6 months ago

Hi Remo. Both of these occurred in clang because clang is evaluating templates before they are used.

Anyway, the first is a bug and I have fixed it in a separate push. Thanks.

The second however is not a problem with a default reference value, that is legal C++. The problem is that the struct context type is being forward-declared (since it's evaluating the template before it's used) and you cannot assign a default value to an argument of a forward-declared type. So I will try to rearrange the code to prevent this.

remoe commented 6 months ago

This is now solved by:

43237fd6c42b838d9e00ddcf46f19f8423fc081e e00f167b0cfc755283f338b11ee5554f4bbc6c1f