| 61 | { |
| 62 | template <class T, size_t N> |
| 63 | bool FromStringArray(string const & s, T (&arr)[N]) |
| 64 | { |
| 65 | std::istringstream in(s); |
| 66 | size_t count = 0; |
| 67 | while (count < N && in >> arr[count]) |
| 68 | { |
| 69 | if (!math::is_finite(arr[count])) |
| 70 | return false; |
| 71 | ++count; |
| 72 | } |
| 73 | |
| 74 | return (!in.fail() && count == N); |
| 75 | } |
| 76 | } // namespace impl |
| 77 | |
| 78 | template <> |