Was cleaning up some older code and wanted to add an initializer_list to a simple wrapper class. The data from the list is to be passed to an API function that accepts a pointer and length.
I was thinking of doing something like:
Is this 'kosher'? I'd like to avoid having to create a temporary store to copy the data.
Or perhaps just:
would work? http://en.cppreference.com/w/cpp/utility/initializer_list states that the iterator type is a pointer.
Edited by Ryan_001, 23 January 2014 - 04:48 AM.