20 template <
typename T,
size_t N>
21 std::ostream &tlp::operator<<(std::ostream &os, const tlp::Array<T, N> &a) {
24 for (
unsigned int i = 0; i < N; ++i) {
35 template <
typename T,
size_t N>
36 std::istream &
tlp::operator>>(std::istream &is, tlp::Array<T, N> &outA) {
42 while (
bool(is >> c) && isspace(c)) {
47 is.setstate(std::ios::failbit);
51 for (
unsigned int i = 0; i < N; ++i) {
56 while ((ok =
bool(is >> c)) && isspace(c)) {
59 if (!ok || c !=
',') {
61 is.setstate(std::ios::failbit);
67 while ((ok =
bool(is >> c)) && isspace(c)) {
71 bool done = bool(is >> outA[i]);
75 is.setstate(std::ios::failbit);
81 while (
bool(is >> c) && isspace(c)) {
86 is.setstate(std::ios::failbit);
std::istream & operator>>(std::istream &is, Array< T, N > &array)
operator >> stream operator to easily read an array