Commit 2a544906 authored by Davis King's avatar Davis King

Changed the assert macros so that they don't use __PRETTY_FUNCTION__

with gcc 4.4.5 since, on Ubuntu at least, this version of gcc segfaults
when __PRETTY_FUNCTION__ is used within certain template constructs.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403861
parent 4f866605
...@@ -59,7 +59,14 @@ namespace dlib ...@@ -59,7 +59,14 @@ namespace dlib
// ----------------------------- // -----------------------------
#ifdef __GNUC__ #ifdef __GNUC__
#define DLIB_FUNCTION_NAME __PRETTY_FUNCTION__ // There is a bug in version 4.4.5 of GCC on Ubuntu which causes GCC to segfault
// when __PRETTY_FUNCTION__ is used within certain templated functions. So just
// don't use it with this version of GCC.
# if !(__GNUC__ == 4 && __GNUC_MINOR__ == 4 && __GNUC_PATCHLEVEL__ == 5)
# define DLIB_FUNCTION_NAME __PRETTY_FUNCTION__
# else
# define DLIB_FUNCTION_NAME "unknown function"
# endif
#elif _MSC_VER #elif _MSC_VER
#define DLIB_FUNCTION_NAME __FUNCSIG__ #define DLIB_FUNCTION_NAME __FUNCSIG__
#else #else
......
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