// Better handling of arrays with structures
// From: The C++ Programming Language (4th Edition), Bjarne Stroustrup
#include <cstddef>
#include <iostream>
struct point {
int x, y;
};
std::ostream& operator<<(std::ostream& os, point& p) {
std::cout << "{" << p.x << "," << p.y << "}";
return os;
}
template <typename T, std::size_t N>
struct array {
T elem[N];
This file has been truncated. show original