From 06a552ee89f16f0fb8ddf666c24c0db5625f132b Mon Sep 17 00:00:00 2001 From: caseymcc Date: Mon, 14 Nov 2016 13:52:45 -0600 Subject: [PATCH] Remove initializer lists support for Apple/Clang (libstdc++ version used does not include std::initializer_list) --- dlib/assert.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlib/assert.h b/dlib/assert.h index 6d7a4882e..2220dd73a 100644 --- a/dlib/assert.h +++ b/dlib/assert.h @@ -47,6 +47,10 @@ # define DLIB_HAS_INITIALIZER_LISTS #endif +#if defined(__APPLE__) && defined(__GNUC_LIBSTD__) && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) + // Apple has not updated libstdc++ in some time and anything under 4.02 does not have for sure. +# undef DLIB_HAS_INITIALIZER_LISTS +#endif // figure out if the compiler has static_assert. #if defined(__clang__)