Commit 6d1a18c0 authored by Davis King's avatar Davis King

Renamed is_const to is_const_type.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402617
parent b07a618f
......@@ -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.
!*/
template <typename T>
struct is_const
struct is_const_type
{
static const bool value = false;
};
template <typename T>
struct is_const<const T>
struct is_const_type<const T>
{
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
// 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)
{ 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
// 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)
{ 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
// 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)
{ 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
// 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)
{ 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
// 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)
{ mp_impl_T<mp_impl<T> >(&object,cb).clone(mp_memory.data); }
......
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