mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Made the is_matrix template a little more robust.
--HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402262
This commit is contained in:
parent
add9a09a0a
commit
1d2c7a1ca1
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user