Minor cleanup

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403383
This commit is contained in:
Davis King 2010-01-12 00:16:16 +00:00
parent 6a81ba6b23
commit 381cfb191a

View File

@ -305,8 +305,10 @@ namespace dlib
T& get(
)
{
// ERROR: You are trying to get a type of object that isn't currently
// in the type_safe_union.
// ERROR: You are trying to get a type of object that isn't
// representable by this type_safe_union. I.e. The given
// type T isn't one of the ones given to this object's template
// arguments.
COMPILE_TIME_ASSERT(( is_same_type<T,T1>::value ||
is_same_type<T,T2>::value ||
is_same_type<T,T3>::value ||
@ -319,7 +321,8 @@ namespace dlib
is_same_type<T,T10>::value
));
construct<T>(); return *reinterpret_cast<T*>(mem.get());
construct<T>();
return *reinterpret_cast<T*>(mem.get());
}
};