mirror of https://github.com/davisking/dlib.git
Renamed is_const to is_const_type.
--HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402617
This commit is contained in:
parent
b07a618fd6
commit
6d1a18c0ea
|
@ -348,19 +348,19 @@ namespace dlib
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
/*!A is_const
|
/*!A is_const_type
|
||||||
|
|
||||||
This is a template where is_const<T>::value == true when T is a const
|
This is a template where is_const_type<T>::value == true when T is a const
|
||||||
type ane false otherwise.
|
type ane false otherwise.
|
||||||
!*/
|
!*/
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct is_const
|
struct is_const_type
|
||||||
{
|
{
|
||||||
static const bool value = false;
|
static const bool value = false;
|
||||||
};
|
};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct is_const<const T>
|
struct is_const_type<const T>
|
||||||
{
|
{
|
||||||
static const bool value = true;
|
static const bool value = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -210,7 +210,7 @@ namespace dlib
|
||||||
|
|
||||||
// the reason for putting disable_if on this function is that it avoids an overload
|
// the reason for putting disable_if on this function is that it avoids an overload
|
||||||
// resolution bug in visual studio.
|
// resolution bug in visual studio.
|
||||||
template <typename T> typename disable_if<is_const<T>,void>::type
|
template <typename T> typename disable_if<is_const_type<T>,void>::type
|
||||||
set(T& object, typename mp_impl<T>::mfp_pointer_type cb)
|
set(T& object, typename mp_impl<T>::mfp_pointer_type cb)
|
||||||
{ mp_impl_T<mp_impl<T> >(&object,cb).clone(mp_memory.data); }
|
{ mp_impl_T<mp_impl<T> >(&object,cb).clone(mp_memory.data); }
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ namespace dlib
|
||||||
|
|
||||||
// the reason for putting disable_if on this function is that it avoids an overload
|
// the reason for putting disable_if on this function is that it avoids an overload
|
||||||
// resolution bug in visual studio.
|
// resolution bug in visual studio.
|
||||||
template <typename T> typename disable_if<is_const<T>,void>::type
|
template <typename T> typename disable_if<is_const_type<T>,void>::type
|
||||||
set(T& object, typename mp_impl<T>::mfp_pointer_type cb)
|
set(T& object, typename mp_impl<T>::mfp_pointer_type cb)
|
||||||
{ mp_impl_T<mp_impl<T> >(&object,cb).clone(mp_memory.data); }
|
{ mp_impl_T<mp_impl<T> >(&object,cb).clone(mp_memory.data); }
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ namespace dlib
|
||||||
|
|
||||||
// the reason for putting disable_if on this function is that it avoids an overload
|
// the reason for putting disable_if on this function is that it avoids an overload
|
||||||
// resolution bug in visual studio.
|
// resolution bug in visual studio.
|
||||||
template <typename T> typename disable_if<is_const<T>,void>::type
|
template <typename T> typename disable_if<is_const_type<T>,void>::type
|
||||||
set(T& object, typename mp_impl<T>::mfp_pointer_type cb)
|
set(T& object, typename mp_impl<T>::mfp_pointer_type cb)
|
||||||
{ mp_impl_T<mp_impl<T> >(&object,cb).clone(mp_memory.data); }
|
{ mp_impl_T<mp_impl<T> >(&object,cb).clone(mp_memory.data); }
|
||||||
|
|
||||||
|
@ -390,7 +390,7 @@ namespace dlib
|
||||||
|
|
||||||
// the reason for putting disable_if on this function is that it avoids an overload
|
// the reason for putting disable_if on this function is that it avoids an overload
|
||||||
// resolution bug in visual studio.
|
// resolution bug in visual studio.
|
||||||
template <typename T> typename disable_if<is_const<T>,void>::type
|
template <typename T> typename disable_if<is_const_type<T>,void>::type
|
||||||
set(T& object, typename mp_impl<T>::mfp_pointer_type cb)
|
set(T& object, typename mp_impl<T>::mfp_pointer_type cb)
|
||||||
{ mp_impl_T<mp_impl<T> >(&object,cb).clone(mp_memory.data); }
|
{ mp_impl_T<mp_impl<T> >(&object,cb).clone(mp_memory.data); }
|
||||||
|
|
||||||
|
@ -453,7 +453,7 @@ namespace dlib
|
||||||
|
|
||||||
// the reason for putting disable_if on this function is that it avoids an overload
|
// the reason for putting disable_if on this function is that it avoids an overload
|
||||||
// resolution bug in visual studio.
|
// resolution bug in visual studio.
|
||||||
template <typename T> typename disable_if<is_const<T>,void>::type
|
template <typename T> typename disable_if<is_const_type<T>,void>::type
|
||||||
set(T& object, typename mp_impl<T>::mfp_pointer_type cb)
|
set(T& object, typename mp_impl<T>::mfp_pointer_type cb)
|
||||||
{ mp_impl_T<mp_impl<T> >(&object,cb).clone(mp_memory.data); }
|
{ mp_impl_T<mp_impl<T> >(&object,cb).clone(mp_memory.data); }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue