Closed soerengrunewald closed 7 months ago
Tests trigger :tada: @alt-graph ;)
This is missing unit tests :laughing:
And documentation :rofl:
Nice little helper! I wouldn't create another header for it, though. Maybe we can stuff it into utility.h or traits.h? Ah yes, tests and documentation... :) Don't know about the copyright situation. Can we just rewrite it from scratch? Otherwise we need an entry in our copyright list.
Maybe make_array()
would also be a possible name.
No answer from author within 4 months, so closing...
Maybe use this implementation from cppreference:
Maybe
make_array()
would also be a possible name.
to_array
would be the backport.
I played a bit around in the attempt to backport std::to_array
bit. It works only with primitive types and strings. More complex types make trouble, so I will close this MR for now.
I have found this a while ago as merge request in the dxvk project. It simplifies the initialization of std::array, as one does not have to specify the actual array size. Instead we let the compiler figure it out.
There something similar available with std::experimental::make_array.