Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
What I called a misaligned buffer here is a buffer that doesn't start at the address that its type alignment advertises. For example if a type is aligned at 8, you'd expect it's address to be a multiple of 8. If it isn't, it's misaligned. In the test, I build a buffer that has some arbitrary alignment, then break it to make it start at an incorrect address before calling your function.
I actually changed the prototype in my own solution to
const Parameters&
after I realized my mistake, but I apparently forgot to change the initial solution. Thank you for pointing it out!I had std::forward in my initial solution as well but after further reflexion I think it's incorrect. Since we're in a loop every subsequent call to the ctor is moving from objects in an undefined state which is probably not what we want. I could most likely write a test that breaks on such code but I don't think it's within the scope of the kata.
Thank you for reminding me of destructuring assignment though! I had completely forgotten that it's part of C++ now ^_^