Skip to content

Instantly share code, notes, and snippets.

@shoooe
Last active January 2, 2016 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shoooe/8367091 to your computer and use it in GitHub Desktop.
Save shoooe/8367091 to your computer and use it in GitHub Desktop.
#include <numeric>
namespace std {
template<class T, std::size_t N, std::size_t M>
T* begin(T (&array)[N][M]) {
return &array[0][0];
}
template<class T, std::size_t N, std::size_t M>
T* end(T (&array)[N][M]) {
return &array[0][0] + M * N;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment