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

Changed code to avoid a bug in visual studio 7.1

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402813
parent a690003d
......@@ -77,7 +77,7 @@ namespace
f_val = 4.345;
f_val = 4.345f;
a.get<float>() = f_val;
DLIB_CASSERT(a.is_empty() == false,"");
......
......@@ -36,20 +36,16 @@ namespace dlib
private:
template <typename A, typename B>
struct max
{
const static size_t value = tmax<sizeof(A), sizeof(B)>::value;
};
template <typename A, typename B, typename C>
struct max<max<A,B>, C>
{
const static size_t value = tmax<max<A,B>::value, sizeof(C)>::value;
};
const static size_t max_size = max<max<max<max<max<max<max<max<max<T1,T2>,T3>,T4>,T5>,T6>,T7>,T8>,T9>,T10>::value;
const static size_t max_size = tmax<tmax<tmax<tmax<tmax<tmax<tmax<tmax<tmax<sizeof(T1),
sizeof(T2)>::value,
sizeof(T3)>::value,
sizeof(T4)>::value,
sizeof(T5)>::value,
sizeof(T6)>::value,
sizeof(T7)>::value,
sizeof(T8)>::value,
sizeof(T9)>::value,
sizeof(T10)>::value;
union mem_block
{
......
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