Advertisement
Guest User

Untitled

a guest
Dec 9th, 2013
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. template<typename T, std::size_t N>
  2. bool eqArray(
  3.     const std::array<T, N> &l
  4.    ,const std::array<T, N> &r
  5.    ,typename std::enable_if<std::is_pod<T>::value>::type* = 0)
  6. {
  7.    return 0 == std::memcmp(l.data(), r.data(), sizeof(T)*N);
  8. }
  9. template<typename T, std::size_t N>
  10. bool eqArray(
  11.     const std::array<T, N> &l
  12.    ,const std::array<T, N> &r
  13.    ,typename std::enable_if<!std::is_pod<T>::value>::type* = 0)
  14. {
  15.    for ( ... ) ...
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement