You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The gfakluge.hpp header consists mostly of methods that are neither inline nor template. That means it can't be included by multiple .cpp's, or else you will get redefinition errors at linking (because a copy of each gfakluge method gets compiled into each of the .o's). IMO, that's a pretty hefty restriction in exchange for header-only-ness.
The text was updated successfully, but these errors were encountered:
I see - I agree this is probably an unnecessary restriction, though I like header-only-ness a lot. I haven’t had a pattern where the hpp got included in multiple places yet.
Will inlining solve this? That’s something I’m happy to do; I don’t remember exactly why I didn’t initially but I vaguely remember it being a conscious decision.
Yes, it will fix it -- I went ahead an inlined everything in the vgteam fork. If you decided not to do it before, it's probably because there's a risk of having it blow up the size of your binary. That said, compilers don't always inline when you tell them to, and they don't always not inline when you don't tell them to.
It was probably the binary bloat issue, but I don't think I've ever seen it go too crazy in practice (plus these function just don't get written into other code repeatedly much since they're for IO). Aside: doesn't inline mean something different for classes? Who even speaks C++?
Would you mind PR'ing the changes on vgteam into here? I'll write up a tiny travis.yaml and then we can test/merge/keep the forks level.
The gfakluge.hpp header consists mostly of methods that are neither inline nor template. That means it can't be included by multiple .cpp's, or else you will get redefinition errors at linking (because a copy of each gfakluge method gets compiled into each of the .o's). IMO, that's a pretty hefty restriction in exchange for header-only-ness.
The text was updated successfully, but these errors were encountered: