Closed beemaster closed 8 years ago
Did you try turning the warning off with a pragma as suggested in #28? I'd kinda prefer that solution since I think the existing code is more logical and valid than the fix here (see http://stackoverflow.com/questions/32608458/is-passing-a-c-object-into-its-own-constructor-legal )
Using macro with Xcode version check and disabling warning seems more ugly to me. Clang developers also introduced this warning for a reason. I think because the uninitialized object is
allowed to be used in limited ways
One day one might forget that object is not initialized yet and do something with it.
It turns out that removing the std::array
seems to fix this problem in a somewhat nicer way (especially since it allows removal of an icky MSVC workaround.)
Thanks for taking the time to report the problem and propose a patch.
This fixes issue #28