std::array<char, N> to std::string
arrays, c++, c++11, std, string
Solution
I won't say it is the "best way", but a way is to use `std::string`'s iterator constructor:
std::array<char, 10> arr;
... // fill in arr
std::string str(std::begin(arr), std::end(arr));
Problem
What is the best way to convert from a `std::array<char, N>` to a `std::string`? I have tried producing a template method but have had no luck. I think my C++ skills just aren't up to scratch. Is there an idiomatic way of doing this in C++?