Commit 1d2c7a1c authored by Davis King's avatar Davis King

Made the is_matrix template a little more robust.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402262
parent add9a09a
......@@ -26,6 +26,12 @@ namespace dlib
struct is_matrix<matrix_ref<T,NR,NC,mm> > { static const bool value = true; };
template <typename T, long NR, long NC, typename mm>
struct is_matrix<matrix<T,NR,NC,mm> > { static const bool value = true; };
template <typename T>
struct is_matrix<T&> { static const bool value = is_matrix<T>::value; };
template <typename T>
struct is_matrix<const T&> { static const bool value = is_matrix<T>::value; };
template <typename T>
struct is_matrix<const T> { static const bool value = is_matrix<T>::value; };
/*
is_matrix<T>::value == 1 if T is a matrix type else 0
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment